The WooCommerce filter field guide
Developer Guide.
Extend ModeFilter Pro: register custom filters and templates, override the product template, and hook into catalog mode, enquiry buttons and stock alerts.
ModeFilter Pro is object-oriented and uses standard WordPress hooks. It does not call external APIs.
Override the product card
Copy templates/content-product-modep.php from the plugin into your theme as yourtheme/woocommerce/content-product-modep.php and edit it.
Filters
| Hook | Purpose |
|---|---|
modep_template_kits | Add or change templates. Receives and returns the array of kits |
modep_template_providers | Return extra library templates (for example from a cloud catalogue). Keyed by id |
modep_custom_filters | Register custom filter blocks as key => label |
modep_render_pro_layout | Return HTML to replace the whole render. Receives the attributes |
modep_admin_tabs | Add tabs to the ModeFilter Pro admin pages |
modep_effective_catalog_mode | Adjust whether a product is shown in Sell or Catalog mode |
modep_catalog_enquiry_button_href, modep_catalog_enquiry_button_label | Change the enquiry button link and text |
modep_docs_url, modep_yt_url | Change the documentation and video links in the admin |
Actions
| Hook | When |
|---|---|
modep_stock_subscribed | After a visitor subscribes to a stock alert (product ID, email) |
modep_stock_notified | After stock alerts are sent (product ID, subscribers) |
modep_before_custom_filter_sanitize | Before custom filter settings are saved |
Example: add a template in code
add_filter( 'modep_template_kits', function ( $kits ) {
$kits['my-shop'] = [
'name' => 'My Shop',
'description' => 'Four columns, checkbox filters',
'thumbnail' => get_stylesheet_directory_uri() . '/my-shop.png',
'config' => [
'columns' => 4,
'filter_style' => 'checkboxes',
'filter_position' => 'drawer',
],
];
return $kits;
} );
Example: change the enquiry button text
add_filter( 'modep_catalog_enquiry_button_label', function ( $label, $product, $settings ) {
return 'Ask about ' . $product->get_name();
}, 10, 3 );
Compatibility
- Declares compatibility with WooCommerce High-Performance Order Storage (HPOS).
- Uses native WooCommerce queries and the WordPress AJAX API.
- Fully translatable (text domain
modefilter-pro).
