HUSKY - Product Filter for WooCommerce

woof_ext_custom_title_by_onsales

Allows customization of the label text shown for the 'On sale' filter checkbox in both the frontend view and the JavaScript localization array.

Parameters

$label (string) — The default translated label string, typically 'On sale'

Source File

ext/by_onsales/index.php:20

ext/by_onsales/views/woof.php:7

Code Example


add_filter('woof_ext_custom_title_by_onsales', function($label) {
    return __('Special Offers', 'my-theme');
});

Usage Notes

  • Applied in two places: index.php sets js_lang_custom via self::$includes, views/woof.php sets $woof_ext_onsales_label for rendering.
  • The default is the translation of 'On sale'.
  • Part of the extension system where $this->index = 'onsales' determines the JS key.