WordPress at Your Fingertips
function is not described

WC_Shortcodes::featured_products() public WC 1.0

Output featured products.

{} It's a method of the class: WC_Shortcodes{}

No Hooks.

Return

String.

Usage

$result = WC_Shortcodes::featured_products( $atts );
$atts(array) (required)
Attributes.

Code of WC_Shortcodes::featured_products() WC 5.9.0

public static function featured_products( $atts ) {
	$atts = array_merge(
		array(
			'limit'        => '12',
			'columns'      => '4',
			'orderby'      => 'date',
			'order'        => 'DESC',
			'category'     => '',
			'cat_operator' => 'IN',
		),
		(array) $atts
	);

	$atts['visibility'] = 'featured';

	$shortcode = new WC_Shortcode_Products( $atts, 'featured_products' );

	return $shortcode->get_content();
}