Skip to content

Hooks and Filters

This page lists the hooks the addon provides for developers, plus the key hooks it consumes. The addon registers no REST routes, no shortcodes, no blocks, no custom post types, and no WP-CLI commands. It exposes one AJAX action.

Filter Args Purpose
reign_wcfm_favourite_product_tab_name $name Rename the Favourite profile tab.
reign_wcfm_favourite_product_tab_slug $slug Change the Favourite tab URL slug.
reign_wcfm_vendor_store_tab_name $name Rename the Store profile tab.
reign_wcfm_vendor_store_tab_slug $slug Change the Store tab URL slug.
Filter Args Purpose
reign_wcfm_favourite_product_icon $html Filter the full heart-icon markup before output.
reign_wcfm_fav_product_bp_tab_posts_per_page $posts_per_page Products per page on the Favourite and Store profile tabs.
reign_dokan_fav_product_bp_tab_posts_per_page $posts_per_page Legacy alias of the above, kept for back-compatibility. Prefer the reign_wcfm_ name.
Filter Args Purpose
reign_wcfm_format_activity_action_product_create $action, $activity Filter the “added a new product” action string. Also applied at creation time with one argument.
reign_wcfm_format_activity_action_product_review $action, $activity Filter the “wrote a review” action string.
reirn_wcfm_format_activity_action_product_create $action Legacy misspelled alias applied at product-creation time only. Kept for back-compatibility. Use the correctly spelled filter above.
Filter Args Purpose
wbtm_reign_wcfm_vertical_tabs $tabs Add or change the vertical sub-tabs (General, Single Store) inside the WCFM Marketplace settings tab.
wcfm_store_wrapper_class $classes The addon adds the current layout class (layout_one / layout_two) to the WCFM store wrapper. It is also applied by the Layout 2 template.
Action Purpose
render_theme_options_for_wcfm_general Renders the General sub-tab controls. Consumed by the addon itself.
render_theme_options_for_wcfm_single_store Renders the Single Store sub-tab controls. Consumed by the addon itself.
Action Access Purpose
product_mark_favuorite Logged-in users Toggles a product in the current user’s favourites. Validated by the reign-wcfm-nonce nonce and confirmed to be a real product post before storing.

Note the deliberate spelling favuorite. It is a fixed contract between the JavaScript and the PHP handler. Do not rename one side without the other.

  • From the Reign theme: alter_reign_admin_tabs, render_theme_options_page_for_reign_wcfm, reign_other_premium_addon_license_panel.
  • From WCFM: wcfm_locate_template (to swap in the Layout 2 store template).
  • From WooCommerce: woocommerce_single_product_summary, woocommerce_before_shop_loop_item_title, woocommerce_before_shop_loop, woocommerce_shortcode_products_query, woocommerce_shortcode_products_query_results, woocommerce_thankyou.
  • From BuddyPress: bp_setup_nav, bp_register_activity_actions, bp_get_activity_content_body, bp_activity_entry_content, transition_post_status, comment_post, wp_set_comment_status.
  • From third parties: youzify_activity_new_post_action (Youzify), yith_wcact_load_script_everywhere and yith_wcact_load_acution_price_html (YITH Auctions).