WC_Product_Variable_Data_Store_Interface::delete_variations()
Delete variations of a product.
Method of the class: WC_Product_Variable_Data_Store_Interface{}
No Hooks.
Return
null
. Nothing (null).
Usage
$WC_Product_Variable_Data_Store_Interface = new WC_Product_Variable_Data_Store_Interface(); $WC_Product_Variable_Data_Store_Interface->delete_variations( $product_id, $force_delete );
- $product_id(int) (required)
- Product ID.
- $force_delete(true|false)
- False to trash.
Default: false
WC_Product_Variable_Data_Store_Interface::delete_variations() WC Product Variable Data Store Interface::delete variations code WC 9.4.2
public function delete_variations( $product_id, $force_delete = false );