woocommerce_api_create_tax

woocommerce_api_create_tax

Appears in: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,
Hook Type: action

See hook in core

Displaying hooks found in version: woocommerce.8.9.3

do_action('woocommerce_api_create_tax') is found 1 times:

  • /includes/legacy/api/v3/class-wc-api-taxes.php line 231
    227
    228
    229
    230
    231
    232
    233
    234
    235
    236
    237
        if ( ! empty( $data['city'] ) ) {
            WC_Tax::_update_tax_rate_cities( $id, wc_clean( $data['city'] ) );
        }
     
        do_action( 'woocommerce_api_create_tax', $id, $data );
     
        $this->server->send_status( 201 );
     
        return $this->get_tax( $id );
    } catch ( WC_API_Exception $e ) {
        return new WP_Error( $e->getErrorCode(), $e->getMessage(), array( 'status' => $e->getCode() ) );