WC_Cache_Helper::invalidate_attribute_count()
Used to clear layered nav counts based on passed attribute names.
Method of the class: WC_Cache_Helper{}
No Hooks.
Return
null
. Nothing (null).
Usage
$result = WC_Cache_Helper::invalidate_attribute_count( $attribute_keys );
- $attribute_keys(array) (required)
- Attribute keys.
Changelog
Since 3.6.0 | Introduced. |
WC_Cache_Helper::invalidate_attribute_count() WC Cache Helper::invalidate attribute count code WC 8.7.0
public static function invalidate_attribute_count( $attribute_keys ) { if ( $attribute_keys ) { foreach ( $attribute_keys as $attribute_key ) { self::queue_delete_transient( 'wc_layered_nav_counts_' . $attribute_key ); } } }