woocommerce_api_product_response

woocommerce_api_product_response

Appears in: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,
Hook Type: filter
See hook in action

See hook in core

Displaying hooks found in version: woocommerce.8.9.3

apply_filters('woocommerce_api_product_response') is found 3 times:

  • /includes/legacy/api/v1/class-wc-api-products.php line 127
    123
    124
    125
    126
    127
    128
    129
    130
    131
    132
    133
        if ( $product->is_type( 'variation' ) ) {
            $product_data['parent'] = $this->get_product_data( $product->get_parent_id() );
        }
     
        return array( 'product' => apply_filters( 'woocommerce_api_product_response', $product_data, $product, $fields, $this->server ) );
    }
     
    /**
     * Get the total number of orders
     *
     * @since 2.1
  • /includes/legacy/api/v2/class-wc-api-products.php line 169
    165
    166
    167
    168
    169
    170
    171
    172
    173
    174
    175
            $_product = wc_get_product( $product->get_parent_id() );
            $product_data['parent'] = $this->get_product_data( $_product );
        }
     
        return array( 'product' => apply_filters( 'woocommerce_api_product_response', $product_data, $product, $fields, $this->server ) );
    }
     
    /**
     * Get the total number of products
     *
     * @since 2.1
  • /includes/legacy/api/v3/class-wc-api-products.php line 218
    214
    215
    216
    217
    218
    219
    220
    221
    222
    223
    224
                $product_data['parent'] = $this->get_product_data( $_product );
            }
        }
     
        return array( 'product' => apply_filters( 'woocommerce_api_product_response', $product_data, $product, $fields, $this->server ) );
    }
     
    /**
     * Get the total number of products
     *
     * @since 2.1

See this hook used in plugins: