woocommerce_api_create_product_category_data

woocommerce_api_create_product_category_data

Appears in: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,
Hook Type: filter

See hook in core

Displaying hooks found in version: woocommerce.8.9.3

apply_filters('woocommerce_api_create_product_category_data') is found 1 times:

  • /includes/legacy/api/v3/class-wc-api-products.php line 725
    721
    722
    723
    724
    725
    726
    727
    728
    729
    730
    731
        'image'       => '',
    );
     
    $data = wp_parse_args( $data['product_category'], $defaults );
    $data = apply_filters( 'woocommerce_api_create_product_category_data', $data, $this );
     
    // Check parent.
    $data['parent'] = absint( $data['parent'] );
    if ( $data['parent'] ) {
        $parent = get_term_by( 'id', $data['parent'], 'product_cat' );
        if ( ! $parent ) {