Filters and templates
for developers.
Filters
Section titled “Filters”| Filter | Purpose |
|---|---|
reign_dokan_default_settings |
Change the default value of any setting. |
reign_mv_favourites_cap |
Maximum saved products per member (default 200, never below 1). The REIGN_MV_FAVOURITES_CAP constant sets the starting value. |
reign_dokan_is_community_surface |
Load the heart styles and script on a page that is not a shop page. Receives a boolean that is true on shop, My Account, Dokan store and BuddyPress pages. |
reign_dokan_vendor_block_args |
Change what the Sold by line receives: an array with name (the store name) and url (the store link, empty when the seller has no store page). |
Actions
Section titled “Actions”| Action | Purpose |
|---|---|
reign_dokan_loaded |
Fires once the add-on has loaded. It passes no arguments. |
Templates
Section titled “Templates”Copy a file from the plugin’s templates/ folder into dokan/reign/ in your child theme. Keep the @version line in the file header. A copy with no version, or older than the plugin’s, shows an admin notice on the Plugins, Dashboard, Themes, Updates and Reign Settings screens, listing each file with both versions.
| File | Template version | Used for |
|---|---|---|
sold-by.php |
1.0.1 | The Sold by line. Receives name and url. |
heart.php |
1.0.0 | The favourite heart button. Receives product_id, saved and inline. |
activity-card.php |
1.0.0 | The activity stream card. |
Examples
Section titled “Examples”Change what the Sold by line receives. This adds a word after every shop name.
add_filter( 'reign_dokan_vendor_block_args', function ( $args ) { $args['name'] .= ' (verified)'; return $args;} );The product page then reads “Sold by: Harbor & Pine (verified)”.
Change a default setting. This starts every new site with the Store tab off. A value saved on the settings screen still wins.
add_filter( 'reign_dokan_default_settings', function ( $defaults ) { $defaults['store_tab'] = 0; return $defaults;} );More task-based snippets, and one full template override, are in Common changes with a few lines of code.
Stored data
Section titled “Stored data”- Settings: the
dokankey of thereign_optionsoption. - Favourites: user meta
reign_mv_favourite_products(a list of product IDs, newest last).
The full list of options, user meta, the AJAX action and the profile tabs is in Data, endpoints and integration points.

