Automattic\WooCommerce\Internal\Caches

ProductCache::removepublicWC 10.5.0

Remove a product from the cache.

Method of the class: ProductCache{}

No Hooks.

Returns

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

Usage

$ProductCache = new ProductCache();
$ProductCache->remove( $id ): bool;
$id(int|string) (required)
The id of the product to remove.

Changelog

Since 10.5.0 Introduced.

ProductCache::remove() code WC 10.8.1

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