HUSKY - Product Filter for WooCommerce

woof_turbo_mode_products_limit

在涡轮模式缓存生成过程中筛选要处理的最大产品数量,设定限制以避免内存或超时问题。

参数

$limit (int) — 要索引的最大产品数量(默认:15000)

源文件

ext/turbo_mode/index.php:277

代码示例

add_filter('woof_turbo_mode_products_limit', function($limit) {
    // Increase limit for large catalogs
    return 50000;
});

使用说明

  • 属于涡轮模式缓存生成过程的一部分,该过程预索引产品数据。
  • 如果已处理的数量超过此限制,缓存生成循环将停止。
  • 该限制可防止在产品目录较大时出现无限循环和服务器资源耗尽。