FilterSmith icon
eCommerce & WooCommerce

FilterSmith hooks reference

FilterSmith 1.1.1 has 8 actions and 17 filters, read directly from its source code on Nov 19, 2026. The list updates automatically when a new version is released.

How to use these hooks

Actions let you run your own code at a specific moment. Filters let you change a value before the plugin uses it. Put your code in a child theme's functions.php or a code-snippets plugin, never in the plugin's own files, because updates overwrite them.

functions.phpyour child theme
// Run your own code when FilterSmith fires an action
add_action( 'cwcf_admin_filters_cells', function( $src, $lbl ) {
	// Your code runs here.
}, 10, 2 );

// Change a value FilterSmith is about to use
add_filter( 'cwcf_admin_tabs', function( $tabs ) {
	// Change $tabs here.
	return $tabs;
}, 10, 1 );

Parts of a name in {braces} are filled in at runtime (for example a post type or field ID). Choose Example on any hook for a ready-to-edit snippet.

All hooks

  • includes/class-admin.php line 533 · used in 2 places
    /**
     * Fires in a row of the filters table. Add-ons add cells here.
     */
    do_action( 'cwcf_admin_filters_cells', $src, $lbl );
  • includes/class-admin.php line 513
    /**
     * Fires in the header row of the filters table. Add-ons add columns here.
     */
    do_action( 'cwcf_admin_filters_head' );
  • includes/class-admin.php line 284
    /**
     * Fires when the settings form is saved (nonce and capability already
     * checked). Add-ons save their fields here.
     */
    do_action( 'cwcf_admin_save' );
  • includes/class-admin.php line 650
    /**
     * Fires inside a settings tab added through the "cwcf_admin_tabs" filter.
     */
    do_action( "cwcf_admin_tab_{$k}" );
  • includes/class-admin.php line 309
    /**
     * Filters the tabs of the settings page.
     */
    apply_filters( 'cwcf_admin_tabs', $tabs );
  • includes/class-core.php line 868
    /**
     * Filters the automatically chosen filters of a page (order, labels, extra
     * filters).
     */
    apply_filters( 'cwcf_auto_filters', $out, $scope );
  • includes/class-config.php line 279
    /**
     * Filters the taxonomy used for the brand filter.
     */
    apply_filters( 'cwcf_brand_taxonomy', $tax );
  • includes/class-config.php line 232
    /**
     * Filters the pattern for code-like attribute keys (matched against the facet
     * key, e.g. "ean-code").
     */
    apply_filters( 'cwcf_code_facet_pattern', '/^(ean|gtin|upc|isbn|mpn|sku|barcode|artikel|art-?nr|artnr|referentie|reference|ref-?nr|leveranciers?|supplier|fabrikant-?code|fabrikantnummer|manufacturer-?(code|number|part)|product-?code|productnummer|product-?id|model-?(nummer|number|code)|typenummer|bestelnummer|order-?(code|number)|korting|discount|prijs-?groep|price-?group|product-?naam|produkt-?naam|product-?name|eenheid|verpakkings?ee... );
  • includes/class-index.php line 88
    /**
     * Filters the attributes that add-ons recognise in product titles.
     */
    apply_filters( 'cwcf_derived_defs', array() );
  • includes/class-config.php line 351
    /**
     * Lets an add-on supply the filters for a page. Return null to use automatic
     * detection.
     */
    apply_filters( 'cwcf_filters_for_scope', null, $scope );
  • includes/class-index.php line 415
    /**
     * Lets add-ons add index rows for a product (for example values recognised in
     * the product title). Each row: array( 'facet' => string, 'val' => string,
     * 'label' => string, 'num' => float|null ), optionally 'facet_label' and
     * 'facet_unit' for a facet that is not in cwcf_derived_defs. Facets that
     * already have real attribute values ($explicit) should be skipped.
     */
    apply_filters( 'cwcf_index_rows', array(), $product, $explicit );
  • includes/class-frontend.php line 63
    /**
     * Filters the CSS selectors the filter script uses to find the product list,
     * pagination and result count. Useful for themes with custom markup.
     */
    apply_filters( 'cwcf_js_selectors', array( 'results' => 'ul.products, ul.wc-block-product-template, .wc-block-grid__products', 'empty' => '.woocommerce-no-products-found, .wp-block-woocommerce-product-collection-no-results, .wp-block-query-no-results', 'pagination' => '.woocommerce-pagination, nav.pagination, .avia-pagination, .wp-block-query-pagination', 'count' => '.woocommerce-result-count, .wp-block-woocommerce-product-result... );
  • includes/class-i18n.php line 32
    /**
     * Filters the languages that can be forced in the settings.
     */
    apply_filters( 'cwcf_languages', array( 'nl' => array( 'locale' => 'nl_NL', 'name' => 'Nederlands', ), 'en' => array( 'locale' => 'en_US', 'name' => 'English', ), ) );
  • includes/class-frontend.php line 114
    /**
     * Whether the light AJAX response is used (classic themes). Return false if
     * your theme needs the full page.
     */
    apply_filters( 'cwcf_light_ajax', true );
  • includes/bootstrap.php line 81
    /**
     * Fires when FilterSmith is fully loaded. Add-ons hook in here.
     */
    do_action( 'cwcf_loaded' );
  • includes/class-core.php line 769
    /**
     * Filters the colour swatch shown next to a filter option.
     */
    apply_filters( 'cwcf_option_swatch', '', $facet, $name );
  • includes/class-i18n.php line 113
    /**
     * Filters the bundled translation file for a text domain and locale.
     */
    apply_filters( 'cwcf_translation_file', $file, $domain, $locale );
  • includes/class-core.php line 649
    /**
     * Filters whether an attribute is offered as a filter on a page.
     */
    apply_filters( 'cwcf_useful_filter', true, $facet, $ids );
  • includes/class-index.php line 161
    /**
     * Filters the value map (merge values with the same meaning, or hide values).
     */
    apply_filters( 'cwcf_value_map', $m );
  • includes/class-frontend.php line 491
    apply_filters( 'cwcf_mobile_visible_options', 8 );
  • includes/class-core.php line 70
    apply_filters( 'loop_shop_per_page', (int) get_option( 'posts_per_page', 12 ) );
  • templates/ajax-results.php line 32
    do_action( 'woocommerce_after_shop_loop' );
  • includes/class-frontend.php line 158
    apply_filters( 'woocommerce_default_catalog_orderby', get_option( 'woocommerce_default_catalog_orderby', 'menu_order' ) );
  • templates/ajax-results.php line 34
    do_action( 'woocommerce_no_products_found' );
  • templates/ajax-results.php line 27
    do_action( 'woocommerce_shop_loop' );

Generated from FilterSmith's GPL-licensed source code. Hooks inside bundled third-party libraries are not listed.

Done for you

Rather have it built for you?

Tell us what should change and we’ll write and test the code using these hooks.

Plugin customisation

from $149

New features or changed behaviour, without editing the plugin’s files.

  • Built as a companion plugin, so updates never wipe it
  • Exact quote before we start
  • Tested on staging, then deployed

Typical turnaround: 3–7 business days

Choose this

Not sure which fits? Describe what you need and we’ll suggest the simplest option.

Can't find the right hook?

We can build the customisation for you. Describe what you need: