woocommerce_product_type_query

woocommerce_product_type_query

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

See hook in core

Displaying hooks found in version: woocommerce.9.8.1

apply_filters('woocommerce_product_type_query') is found 1 times:

  • /includes/class-wc-product-factory.php line 91
    87
    88
    89
    90
    91
    92
    93
    94
    95
    96
    97
    * @return string|false
     */
    public static function get_product_type( $product_id ) {
        // Allow the overriding of the lookup in this function. Return the product type here.
        $override = apply_filters( 'woocommerce_product_type_query', false, $product_id );
        if ( ! $override ) {
            return WC_Data_Store::load( 'product' )->get_product_type( $product_id );
        } else {
            return $override;
        }
    }