woocommerce_rest_insert_tax, $tax, $request, true
woocommerce_rest_insert_tax, $tax, $request, true
Appears in: woocommerce.11.0.0
Hook Type: action
Displaying hooks found in version: woocommerce.11.0.0do_action('woocommerce_rest_insert_tax, $tax, $request, true') is found 1 times:
- /includes/rest-api/Controllers/Version1/class-wc-rest-taxes-v1-controller.php line 433
* @param stdClass $tax Data used to create the tax. * @param WP_REST_Request $request Request object. * @param boolean $creating True when creating tax, false when updating tax. */ do_action( 'woocommerce_rest_insert_tax', $tax, $request, true ); $request->set_param( 'context', 'edit' ); $response = $this->prepare_item_for_response( $tax, $request ); $response = rest_ensure_response( $response ); $response->set_status( 201 ); $response->header( 'Location', rest_url( sprintf( '/%s/%s/%d', $this->namespace, $this->rest_base, $tax->tax_rate_id ) ) );