WC_Shortcodes::featured_products()
Output featured products.
Метод класса: WC_Shortcodes{}
Хуков нет.
Возвращает
Строку
.
Использование
$result = WC_Shortcodes::featured_products( $atts );
- $atts(массив) (обязательный)
- Attributes.
Код WC_Shortcodes::featured_products() WC Shortcodes::featured products WC 8.7.0
public static function featured_products( $atts ) { $atts = array_merge( array( 'limit' => '12', 'columns' => '4', 'orderby' => 'date', 'order' => 'DESC', 'category' => '', 'cat_operator' => 'IN', ), (array) $atts ); $atts['visibility'] = 'featured'; $shortcode = new WC_Shortcode_Products( $atts, 'featured_products' ); return $shortcode->get_content(); }