HUSKY - Product Filter for WooCommerce

woof_print_content_before_redraw_zone

从 v.2.2.4/1.2.4 开始

在产品上方放置任何不会被 AJAX 重绘的商业 HTML 消息。

 

参数

$content (string) — an empty string by default

源文件

views/woof.php

代码示例


add_filter('woof_print_content_before_redraw_zone', function($content) {
    // Show a loading indicator before products redraw
    return '

' . esc_html__('Updating results...', 'woocommerce-products-filter') . '

'; });

使用说明

  • 将此代码添加到你的主题的 functions.php 文件或自定义插件中。
  • 该钩子在筛选过程中应用 — 更改立即生效。
  • 始终从回调函数返回预期的值类型。