Automattic\WooCommerce\Internal\Caches

ProductCache::removepublicWC 10.5.0

Remove a product from the cache.

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

Хуков нет.

Возвращает

true|false. True if the product is removed successfully, false otherwise.

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

$ProductCache = new ProductCache();
$ProductCache->remove( $id ): bool;
$id(int|строка) (обязательный)
The id of the product to remove.

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

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

Код ProductCache::remove() WC 10.5.2

public function remove( $id ): bool {
	return parent::remove( (int) $id );
}