Automattic\WooCommerce\Internal\Caches

ProductVersionStringInvalidator::handle_save_post_productpublicWC 10.5.0

Handle the save_post_product hook.

Метод класса: ProductVersionStringInvalidator{}

Хуков нет.

Возвращает

null. Ничего (null).

Использование

$ProductVersionStringInvalidator = new ProductVersionStringInvalidator();
$ProductVersionStringInvalidator->handle_save_post_product( $post_id ): void;
$post_id(int) (обязательный)
The post ID.

Список изменений

С версии 10.5.0 Введена.

Код ProductVersionStringInvalidator::handle_save_post_product() WC 10.5.2

public function handle_save_post_product( $post_id ): void {
	$post_id = (int) $post_id;

	if ( wp_is_post_autosave( $post_id ) || wp_is_post_revision( $post_id ) ) {
		return;
	}

	$this->invalidate( $post_id );
}