WC_Brands::reset_layered_nav_counts_on_status_change()
Reset Layered Nav cached counts on product status change.
Method of the class: WC_Brands{}
No Hooks.
Return
null
. Nothing (null).
Usage
$WC_Brands = new WC_Brands(); $WC_Brands->reset_layered_nav_counts_on_status_change( $new_status, $old_status, $post );
- $new_status (required)
- -
- $old_status (required)
- -
- $post (required)
- -
WC_Brands::reset_layered_nav_counts_on_status_change() WC Brands::reset layered nav counts on status change code WC 9.5.1
function reset_layered_nav_counts_on_status_change( $new_status, $old_status, $post ) { if ( $post->post_type === 'product' && $old_status !== $new_status ) { $this->invalidate_wc_layered_nav_counts_cache(); } }