WordPress at a glance
function is not described

Automattic\WooCommerce\Admin\Features

Onboarding::sort_woocommerce_themes() public WC 1.0

Sort themes returned from WooCommerce.com

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

No Hooks.

Return

Array. Nothing.

Usage

$result = Onboarding::sort_woocommerce_themes( $themes );
$themes(array) (required)
Array of themes from WooCommerce.com.

Code of Onboarding::sort_woocommerce_themes() WC 5.3.0

<?php
public static function sort_woocommerce_themes( $themes ) {
	usort(
		$themes,
		function ( $product_1, $product_2 ) {
			if ( ! property_exists( $product_1, 'id' ) || ! property_exists( $product_1, 'slug' ) ) {
				return 1;
			}
			if ( ! property_exists( $product_2, 'id' ) || ! property_exists( $product_2, 'slug' ) ) {
				return 1;
			}
			if ( in_array( 'Storefront', array( $product_1->slug, $product_2->slug ), true ) ) {
				return 'Storefront' === $product_1->slug ? -1 : 1;
			}
			return $product_1->id < $product_2->id ? 1 : -1;
		}
	);
	return $themes;
}