WordPress at Your Fingertips
function is not described

WC_Product::delete() public WC 1.0

Delete the product, set its ID to 0, and return result.

{} It's a method of the class: WC_Product{}

No Hooks.


true|false. result


$WC_Product = new WC_Product();
$WC_Product->delete( $force_delete );
Should the product be deleted permanently.

Code of WC_Product::delete() WC 5.5.2

public function delete( $force_delete = false ) {
	$deleted = parent::delete( $force_delete );

	if ( $deleted ) {

	return $deleted;