WordPress at Your Fingertips
function is not described

WC_Shortcodes::best_selling_products() public WC 1.0

List best selling products on sale.

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

No Hooks.

Return

String.

Usage

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

Code of WC_Shortcodes::best_selling_products() WC 5.9.0

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();
}