WordPress at a glance
function is not described

WC_API_Products::delete_product() public WC 1.0

Delete a product

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

No Hooks.

Return

Array|WP_Error.

Usage

$WC_API_Products = new WC_API_Products();
$WC_API_Products->delete_product( $id, $force );
$id(int) (required)
the product ID
$force(true/false)
true to permanently delete order, false to move to trash

Code of WC_API_Products::delete_product() WC 5.0.0

<?php
public function delete_product( $id, $force = false ) {

	$id = $this->validate_request( $id, 'product', 'delete' );

	if ( is_wp_error( $id ) ) {
		return $id;
	}

	return $this->delete( $id, 'product', ( 'true' === $force ) );
}