Skip to content
Hook Type Purpose
reign_wcfm_loaded Action The add-on is running.
reign_wcfm_default_settings Filter Change the default of any setting.
reign_wcfm_favourite_heart Filter Heart markup, product id, whether it is favourited.
reign_wcfm_favourite_limit Filter Favourites kept per member (default 200).
reign_wcfm_profile_products_per_page Filter Products per page on the profile tabs (default 12, at most 48).
reign_wcfm_favourite_tab_name Filter Name of the Favourite products tab.
reign_wcfm_store_tab_name Filter Name of the Store tab.
reign_wcfm_activity_action_product Filter The action line of a new product entry (“Northwind Outfitters added a new product Beanie”). Receives the HTML line and the BuddyPress activity object (user_id is the vendor, item_id the product). Return the HTML line.
reign_wcfm_activity_action_review Filter The action line of a product review entry (“Amina Diallo wrote a review of Beanie”). Receives the HTML line and the activity object (user_id is the reviewer, item_id the product, secondary_item_id the review comment). Return the HTML line.
reign_wcfm_activity_action_order Filter The action line of a purchase entry (“Chloe Martin made a purchase”). Receives the HTML line and the activity object (user_id is the customer, item_id the order). Return the HTML line.

Removed in 2.0.0: the misspelled reirn_ and favuorite names, the reign_dokan_* names and the layout template filters.

The three activity filters run each time an entry is shown, so a change also applies to entries posted before it.

Post purchases to the activity feed on new sites, and reword the purchase line. Order posts are off by default. A value saved on the settings screen still wins.

add_filter( 'reign_wcfm_default_settings', function ( $defaults ) {
$defaults['order_activity'] = 'on';
return $defaults;
} );
add_filter( 'reign_wcfm_activity_action_order', function ( $action, $activity ) {
return sprintf( '%s picked up something new from the shop', bp_core_get_userlink( $activity->user_id ) );
}, 10, 2 );

A paid order then posts “Chloe Martin picked up something new from the shop”.

More task-based snippets are in Common changes with a few lines of code.