Filters and stored data
Reign WC Vendors Addon overviewPremiumGet Reign WC Vendors Addon →
for developers.
Filters
Section titled “Filters”| Filter | Purpose |
|---|---|
reign_wcv_default_settings |
Change the default of any setting. |
reign_wcv_step_aside_for_pro |
Return false to make the add-on post products and reviews and print its own Store tab even with WC Vendors Pro on BuddyBoss. |
reign_mv_favourites_endpoint |
Change the My Account Favourites URL slug. The add-on skips the page and shows a notice if the slug is taken. |
reign_mv_favourites_cap |
Maximum saved products per member (default 200). |
Example
Section titled “Example”Post store orders to the activity feed on new sites. Setting values are on and off, and a value saved on the settings screen still wins.
add_filter( 'reign_wcv_default_settings', function ( $defaults ) { $defaults['order_activity'] = 'on'; return $defaults;} );The keys are enable_favorite_product, store_tab, product_activity, review_activity and order_activity. More task-based snippets are in Common changes with a few lines of code.
Stored data
Section titled “Stored data”| Where | Key | What |
|---|---|---|
| Option | reign_options[wc_vendor_option] |
The five settings. |
| User meta | reign_mv_favourite_products |
Saved product IDs for one member, newest last. Not autoloaded. |
| Activity types | reign_mv_new_product, reign_mv_new_review, reign_mv_new_order |
The three posts. |
| Option | reign_wcv_db_version | The version the one-time upgrade last ran for. |
| Option | reign_wcv_upgrade_notice | The list shown in the one-time “changed these things” notice; deleted when dismissed. |
| Option | reign_wcv_flush_rewrite | A flag asking for one rewrite flush on the next request. Set on activation, update and when the Favourite products switch changes. |
| User meta | reign_mv_favourites_migrated | Marks a member whose 2.7.0 list (rwcv_my_fav_products) has been copied. |
| Activity meta | reign_mv_object, reign_mv_product, reign_mv_comment | What an entry is about; reign_mv_object is how an entry is kept to once. |
The three activity types appear in the activity filter as “New store product”, “New product review” and “New store order”. The profile tabs use the slugs store (position 75) and favourite-products (position 76). The Favourites slug differs from the My Account one on purpose: WordPress would otherwise 404 the profile URL.
The favourite request
Section titled “The favourite request”The heart posts product_id, mode (add or remove) and the nonce. Answers:
| Status | Message | Meaning |
|---|---|---|
| 200 | none | Saved or removed. |
| 403 | This page has expired. Refresh it and try again. | Stale nonce. |
| 403 | Sign in to save favourites. | Not signed in. |
| 400 | That product is not available. | Not a published product. |
| 400 | Your favourites list is full (200). Remove one to add another. | The cap is reached. |
| 400 or 409 | Your favourites are still saving. Try again in a moment. | Another request of the same member held the per-member lock for 5 seconds. |
The add-on registers no REST route. The heart uses one AJAX action, reign_mv_toggle_favourite, for signed-in members with a nonce, registered only while Favourite products is on.

