WC_Brands::output_brand_products()
Displays brand products.
Метод класса: WC_Brands{}
Хуков нет.
Возвращает
Строку
.
Использование
$WC_Brands = new WC_Brands(); $WC_Brands->output_brand_products( $atts );
- $atts(массив) (обязательный)
- -
Код WC_Brands::output_brand_products() WC Brands::output brand products WC 9.4.2
public function output_brand_products( $atts ) { if ( empty( $atts['brand'] ) ) { return ''; } // Add the brand attributes and query arguments. add_filter( 'shortcode_atts_brand_products', array( __CLASS__, 'add_brand_products_shortcode_atts' ), 10, 4 ); add_filter( 'woocommerce_shortcode_products_query', array( __CLASS__, 'get_brand_products_query_args' ), 10, 3 ); $shortcode = new WC_Shortcode_Products( $atts, 'brand_products' ); // Remove the brand attributes and query arguments. remove_filter( 'shortcode_atts_brand_products', array( __CLASS__, 'add_brand_products_shortcode_atts' ), 10 ); remove_filter( 'woocommerce_shortcode_products_query', array( __CLASS__, 'get_brand_products_query_args' ), 10 ); return $shortcode->get_content(); }