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;
});

使用说明

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