WC_Brands::reset_layered_nav_counts_on_status_change
Reset Layered Nav cached counts on product status change.
Метод класса: WC_Brands{}
Хуков нет.
Возвращает
null. Ничего (null).
Использование
$WC_Brands = new WC_Brands(); $WC_Brands->reset_layered_nav_counts_on_status_change( $new_status, $old_status, $post );
- $new_status(обязательный)
- .
- $old_status(обязательный)
- .
- $post(обязательный)
- .
Код WC_Brands::reset_layered_nav_counts_on_status_change() WC Brands::reset layered nav counts on status change WC 10.3.5
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();
}
}