WC_Shortcodes::best_selling_products
List best selling products on sale.
Method of the class: WC_Shortcodes{}
No Hooks.
Returns
String.
Usage
$result = WC_Shortcodes::best_selling_products( $atts );
- $atts(array) (required)
- Attributes.
WC_Shortcodes::best_selling_products() WC Shortcodes::best selling products code WC 10.6.2
public static function best_selling_products( $atts ) {
$atts = array_merge(
array(
'limit' => '12',
'columns' => '4',
'category' => '',
'cat_operator' => 'IN',
),
(array) $atts
);
$shortcode = new WC_Shortcode_Products( $atts, 'best_selling_products' );
return $shortcode->get_content();
}