/ 设置 10 秒超时 // 每日统计清 0 runtime_set('todaycomments', 0); runtime_set('todayarticles', 0); runtime_set('todayusers', 0); if ($forumlist) { $fidarr = array(); foreach ($forumlist as $fid => $forum) { $fidarr[] = $forum['fid']; } forum_update($fidarr, array('todayposts' => 0, 'todaythreads' => 0)); } // 清理临时附件 attach_gc(); // 当天24点 $today = strtotime(date('Ymd')) + 86400; runtime_set('cron_2_last_date', $today, TRUE); // 往前推8个小时,尽量保证在前一天 升级过来和采集的数据会很卡 // table_day_cron($time - 8 * 3600); cache_delete('cron_lock_2'); } } } ?>woocommerce offtopic - Why does wc_get_products($arg) return no products when $arg = 'average_rating' => |Concepts Of Algorithm

woocommerce offtopic - Why does wc_get_products($arg) return no products when $arg = 'average_rating' =>

admin2025-04-20  2

As per documentation the this should return all products with a average rating of 5 but we get no products returned even though we have one product with a rating of 5.

average_rating

Accepts a float: The average rating.

// Get products with all 5-star ratings.
$args = array(
    'average_rating' => 5.0,
);
$products = wc_get_products( $args );
转载请注明原文地址:http://conceptsofalgorithm.com/Algorithm/1745081688a283896.html

最新回复(0)