This commit is contained in:
Joshua T Flowers 2019-10-25 08:39:56 +08:00 committed by GitHub
parent 26f23def50
commit c6bee42514
1 changed files with 6 additions and 0 deletions

View File

@ -172,6 +172,12 @@ class Onboarding {
if ( ! is_wp_error( $theme_data ) ) {
$theme_data = json_decode( $theme_data['body'] );
usort( $theme_data->products, function ($product_1, $product_2) {
if ( 'Storefront' === $product_1->slug ) {
return -1;
}
return $product_1->id < $product_2->id ? 1 : -1;
} );
foreach ( $theme_data->products as $theme ) {
$slug = sanitize_title( $theme->slug );