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