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.

Return

true|false. result

Usage

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

Code of WC_Product::delete() WC 5.5.2

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

	if ( $deleted ) {
		$this->maybe_defer_product_sync();
	}

	return $deleted;
}