Use WC_Cache_Helper::get_cache_prefix() to generate the cache key for wc_orders_count()
This commit is contained in:
parent
1a394fbe02
commit
3c485fc2a1
|
@ -729,7 +729,7 @@ function wc_orders_count( $status ) {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
$cache_key = "wc-orders-{$status}";
|
$cache_key = WC_Cache_Helper::get_cache_prefix( 'orders' ) . $status;
|
||||||
$cached_count = wp_cache_get( $cache_key, 'counts' );
|
$cached_count = wp_cache_get( $cache_key, 'counts' );
|
||||||
|
|
||||||
if ( false !== $cached_count ) {
|
if ( false !== $cached_count ) {
|
||||||
|
|
Loading…
Reference in New Issue