woocommerce_rest_delete_tax
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
woocommerce_rest_delete_tax
woocommerce_rest_delete_tax
woocommerce/includes/rest-api/Controllers/Version1/class-wc-rest-tax-classes-v1-controller.php 240
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 );