WC_Shortcodes::recent_products()
Recent Products shortcode.
Method of the class: WC_Shortcodes{}
No Hooks.
Return
String
.
Usage
$result = WC_Shortcodes::recent_products( $atts );
- $atts(array) (required)
- Attributes.
WC_Shortcodes::recent_products() WC Shortcodes::recent products code WC 9.6.1
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(); }