WC_Shortcodes::sale_products()
List all products on sale.
Method of the class: WC_Shortcodes{}
No Hooks.
Return
String
.
Usage
$result = WC_Shortcodes::sale_products( $atts );
- $atts(array) (required)
- Attributes.
WC_Shortcodes::sale_products() WC Shortcodes::sale products code WC 9.7.1
public static function sale_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, 'sale_products' ); return $shortcode->get_content(); }