woof_ext_custom_title_by_backorder
Filters the text label shown next to the By Backorder (Exclude On Backorder) filter checkbox on the frontend. The default label is set via esc_html__() in the extension's main file and also in the view template. Use this filter to rename the label without modifying plugin files.
Parameters
$title (string) — The default label text. Default values: Exclude On backorder or Exclude: On backorder depending on the call location.
Source File
ext/by_backorder/index.php, line 49ext/by_backorder/views/woof.php, line 7
Code Example
add_filter("woof_ext_custom_title_by_backorder", function ($title) {
return "Hide backordered products";
});
Usage Notes
- Add this code to your theme's
functions.phpfile or a custom plugin. - The hook is called in two places: the PHP class constructor (for JS localization) and the view template (for frontend display).
- Part of the dynamic
woof_ext_custom_title_xxxpattern wherexxxis the extension identifier.