woocommerce_rest_insert_tax_class
Fires after a tax class is created or updated via the REST API.
Usage
add_action( 'woocommerce_rest_insert_tax_class', 'wp_kama_woocommerce_rest_insert_tax_class_action', 10, 3 ); /** * Function for `woocommerce_rest_insert_tax_class` action-hook. * * @param stdClass $tax_class Data used to create the tax class. * @param WP_REST_Request $request Request object. * @param boolean $creating True when creating tax class, false when updating tax class. * * @return void */ function wp_kama_woocommerce_rest_insert_tax_class_action( $tax_class, $request, $creating ){ // action... }
- $tax_class(stdClass)
- Data used to create the tax class.
- $request(WP_REST_Request)
- Request object.
- $creating(true|false)
- True when creating tax class, false when updating tax class.
Where the hook is called
woocommerce_rest_insert_tax_class
woocommerce/includes/rest-api/Controllers/Version1/class-wc-rest-tax-classes-v1-controller.php 188
do_action( 'woocommerce_rest_insert_tax_class', (object) $tax_class, $request, true );