Automattic\WooCommerce\Internal\Caches

ProductCache::remove │ public │ WC 10.5.0

Remove a product from the cache.

Method of the class: ProductCache{}

No Hooks.

Returns

bool. 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 11.1.2

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