Automattic\WooCommerce\Caches

ProductCountCacheService::update_on_product_status_changed_skip_autosave │ public │ WC 1.0

Update the cache whenever a product status changes.

Method of the class: ProductCountCacheService{}

No Hooks.

Returns

void. Nothing (null).

Usage

$ProductCountCacheService = new ProductCountCacheService();
$ProductCountCacheService->update_on_product_status_changed_skip_autosave( $new_status, $old_status, $post ): void;
$new_status(string) (required)
The new post status.
$old_status(string) (required)
The previous post status.
$post(null|WP_Post) (required)
The post object (may be null during autosaves/revisions).

ProductCountCacheService::update_on_product_status_changed_skip_autosave() code WC 11.2.1

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