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