Developer Guide.

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

HookPurpose
modep_template_kitsAdd or change templates. Receives and returns the array of kits
modep_template_providersReturn extra library templates (for example from a cloud catalogue). Keyed by id
modep_custom_filtersRegister custom filter blocks as key => label
modep_render_pro_layoutReturn HTML to replace the whole render. Receives the attributes
modep_admin_tabsAdd tabs to the ModeFilter Pro admin pages
modep_effective_catalog_modeAdjust whether a product is shown in Sell or Catalog mode
modep_catalog_enquiry_button_href, modep_catalog_enquiry_button_labelChange the enquiry button link and text
modep_docs_url, modep_yt_urlChange the documentation and video links in the admin

Actions

HookWhen
modep_stock_subscribedAfter a visitor subscribes to a stock alert (product ID, email)
modep_stock_notifiedAfter stock alerts are sent (product ID, subscribers)
modep_before_custom_filter_sanitizeBefore 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).