Automattic\WooCommerce\Internal\Utilities
ProductUtil::delete_product_specific_transients
Delete the transients related to a specific product. If the product is a variation, delete the transients for the parent too.
Method of the class: ProductUtil{}
No Hooks.
Returns
null. Nothing (null).
Usage
$ProductUtil = new ProductUtil(); $ProductUtil->delete_product_specific_transients( $product_or_id );
- $product_or_id(WC_Product|int) (required)
- The product or the product id.
ProductUtil::delete_product_specific_transients() ProductUtil::delete product specific transients code WC 11.0.0
public function delete_product_specific_transients( $product_or_id ) {
$this->delete_product_specific_transients_for_products( array( $product_or_id ) );
}