Merged in release/release-1.09 (pull request #10)

Release/release 1.09

* Install missing plugins 
* rs set to 1

* rebase pantheon for aws

* rebase pantheon for aws

* prod config change

* prod config change

* fix campaing issue

* revert


Approved-by: Jay Sharma
This commit is contained in:
Rachit Bhargava
2023-12-27 20:55:58 +00:00
committed by Jay Sharma
parent 779393381f
commit 22f10a9edd
2154 changed files with 22313 additions and 209875 deletions

View File

@@ -249,6 +249,8 @@ class OnboardingThemes extends \WC_REST_Data_Controller {
);
}
$current_theme_slug = wp_get_theme()->get_stylesheet();
// To be implemented: 1. Fetch themes from the marketplace API. 2. Convert prices to the requested currency.
// These are Dotcom themes.
$themes = array(
@@ -258,6 +260,7 @@ class OnboardingThemes extends \WC_REST_Data_Controller {
'color_palettes' => array(),
'total_palettes' => 0,
'slug' => 'tsubaki',
'is_active' => 'tsubaki' === $current_theme_slug,
'thumbnail_url' => 'https://i0.wp.com/s2.wp.com/wp-content/themes/premium/tsubaki/screenshot.png',
'link_url' => 'https://wordpress.com/theme/tsubaki/',
),
@@ -267,6 +270,7 @@ class OnboardingThemes extends \WC_REST_Data_Controller {
'color_palettes' => array(),
'total_palettes' => 0,
'slug' => 'tazza',
'is_active' => 'tazza' === $current_theme_slug,
'thumbnail_url' => 'https://i0.wp.com/s2.wp.com/wp-content/themes/premium/tazza/screenshot.png',
'link_url' => 'https://wordpress.com/theme/tazza/',
'total_palettes' => 0,
@@ -298,6 +302,7 @@ class OnboardingThemes extends \WC_REST_Data_Controller {
),
'total_palettes' => 5,
'slug' => 'amulet',
'is_active' => 'amulet' === $current_theme_slug,
'thumbnail_url' => 'https://i0.wp.com/s2.wp.com/wp-content/themes/premium/amulet/screenshot.png',
'link_url' => 'https://wordpress.com/theme/amulet/',
),
@@ -328,6 +333,7 @@ class OnboardingThemes extends \WC_REST_Data_Controller {
),
'total_palettes' => 11,
'slug' => 'zaino',
'is_active' => 'zaino' === $current_theme_slug,
'thumbnail_url' => 'https://i0.wp.com/s2.wp.com/wp-content/themes/premium/zaino/screenshot.png',
'link_url' => 'https://wordpress.com/theme/zaino/',
),
@@ -368,27 +374,12 @@ class OnboardingThemes extends \WC_REST_Data_Controller {
*
* @return array
*/
$filtered_response = apply_filters(
return apply_filters(
'__experimental_woocommerce_rest_get_recommended_themes',
$response,
$industry,
$currency
);
/**
* Loop through themes checking to see if any are currently active
*/
$active_theme = get_stylesheet();
foreach ( $filtered_response['themes'] as &$theme ) {
if ( $theme['slug'] === $active_theme ) {
$theme['is_active'] = true;
} else {
$theme['is_active'] = false;
}
}
return $filtered_response;
}
/**