WC_Brands::reset_layered_nav_counts_on_status_change()publicWC 1.0

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() 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();
	}
}