woocommerce_rest_delete_tax action-hookWC 1.0

Fires after a tax class is deleted via the REST API.

Usage

add_action( 'woocommerce_rest_delete_tax', 'wp_kama_woocommerce_rest_delete_tax_action', 10, 3 );

/**
 * Function for `woocommerce_rest_delete_tax` action-hook.
 * 
 * @param stdClass         $tax_class The tax data.
 * @param WP_REST_Response $response  The response returned from the API.
 * @param WP_REST_Request  $request   The request sent to the API.
 *
 * @return void
 */
function wp_kama_woocommerce_rest_delete_tax_action( $tax_class, $response, $request ){

	// action...
}
$tax_class(stdClass)
The tax data.
$response(WP_REST_Response)
The response returned from the API.
$request(WP_REST_Request)
The request sent to the API.

Where the hook is called

WC_REST_Tax_Classes_V1_Controller::delete_item()
woocommerce_rest_delete_tax
WC_REST_Taxes_V1_Controller::delete_item()
woocommerce_rest_delete_tax
woocommerce/includes/rest-api/Controllers/Version1/class-wc-rest-tax-classes-v1-controller.php 236
do_action( 'woocommerce_rest_delete_tax', (object) $tax_class, $response, $request );
woocommerce/includes/rest-api/Controllers/Version1/class-wc-rest-taxes-v1-controller.php 520
do_action( 'woocommerce_rest_delete_tax', $tax, $response, $request );

Where the hook is used in WooCommerce

Usage not found.