WC_Shortcodes::best_selling_products()
List best selling products on sale.
Method of the class: WC_Shortcodes{}
No Hooks.
Return
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 9.8.1
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(); }