woocommerce_api_create_product_tag

woocommerce_api_create_product_tag

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

See hook in core

Displaying hooks found in version: woocommerce.8.9.3

do_action('woocommerce_api_create_product_tag') is found 1 times:

  • /includes/legacy/api/v3/class-wc-api-products.php line 982
    978
    979
    980
    981
    982
    983
    984
    985
    986
    987
    988
            throw new WC_API_Exception( 'woocommerce_api_cannot_create_product_tag', $insert->get_error_message(), 400 );
        }
        $id = $insert['term_id'];
     
        do_action( 'woocommerce_api_create_product_tag', $id, $data );
     
        $this->server->send_status( 201 );
     
        return $this->get_product_tag( $id );
    } catch ( WC_API_Exception $e ) {
        return new WP_Error( $e->getErrorCode(), $e->getMessage(), array( 'status' => $e->getCode() ) );