Fix set cache loop when no attributes exist
Test strictly for false to prevent an endless set cache loop when you are not using attribute taxonomies or don't have any set. Prevents `wc_get_attribute_taxonomies` function from calling `wp_cache_set` on every page load.
This commit is contained in:
parent
2462877c56
commit
bf42110179
|
@ -51,7 +51,7 @@ function wc_get_attribute_taxonomies() {
|
|||
$cache_key = $prefix . 'attributes';
|
||||
$cache_value = wp_cache_get( $cache_key, 'woocommerce-attributes' );
|
||||
|
||||
if ( $cache_value ) {
|
||||
if ( false !== $cache_value ) {
|
||||
return $cache_value;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue