Automattic\WooCommerce\Caches
ProductCountCacheService::update_on_product_status_changed_skip_autosave
Update the cache whenever a product status changes.
Метод класса: ProductCountCacheService{}
Хуков нет.
Возвращает
void. Ничего (null).
Использование
$ProductCountCacheService = new ProductCountCacheService(); $ProductCountCacheService->update_on_product_status_changed_skip_autosave( $new_status, $old_status, $post ): void;
- $new_status(строка) (обязательный)
- The new post status.
- $old_status(строка) (обязательный)
- The previous post status.
- $post(null|WP_Post) (обязательный)
- The post object (may be null during autosaves/revisions).
Код ProductCountCacheService::update_on_product_status_changed_skip_autosave() ProductCountCacheService::update on product status changed skip autosave WC 11.2.2
public function update_on_product_status_changed_skip_autosave( string $new_status, string $old_status, $post ): void {
if ( $post instanceof WP_Post ) {
$this->update_on_product_status_changed( $new_status, $old_status, $post );
}
}