WordPress at a glance
function is not described

WC_REST_Terms_Controller::delete_item() public WC 1.0

Delete a single term from a taxonomy.

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

Hooks from the method
Return

WP_REST_Response|WP_Error.

Usage

$WC_REST_Terms_Controller = new WC_REST_Terms_Controller();
$WC_REST_Terms_Controller->delete_item( $request );
$request(WP_REST_Request) (required)
Full details about the request.

Code of WC_REST_Terms_Controller::delete_item() WC 5.0.0

<?php
public function delete_item( $request ) {
	$taxonomy = $this->get_taxonomy( $request );
	$force    = isset( $request['force'] ) ? (bool) $request['force'] : false;

	// We don't support trashing for this type, error out.
	if ( ! $force ) {
		return new WP_Error( 'woocommerce_rest_trash_not_supported', __( 'Resource does not support trashing.', 'woocommerce' ), array( 'status' => 501 ) );
	}

	$term = get_term( (int) $request['id'], $taxonomy );
	// Get default category id.
	$default_category_id = absint( get_option( 'default_product_cat', 0 ) );

	// Prevent deleting the default product category.
	if ( $default_category_id === (int) $request['id'] ) {
		return new WP_Error( 'woocommerce_rest_cannot_delete', __( 'Default product category cannot be deleted.', 'woocommerce' ), array( 'status' => 500 ) );
	}

	$request->set_param( 'context', 'edit' );
	$response = $this->prepare_item_for_response( $term, $request );

	$retval = wp_delete_term( $term->term_id, $term->taxonomy );
	if ( ! $retval ) {
		return new WP_Error( 'woocommerce_rest_cannot_delete', __( 'The resource cannot be deleted.', 'woocommerce' ), array( 'status' => 500 ) );
	}

	/**
	 * Fires after a single term is deleted via the REST API.
	 *
	 * @param WP_Term          $term     The deleted term.
	 * @param WP_REST_Response $response The response data.
	 * @param WP_REST_Request  $request  The request sent to the API.
	 */
	do_action( "woocommerce_rest_delete_{$taxonomy}", $term, $response, $request );

	return $response;
}