[CYS] Update the woo.com themes link to include the back url (#45661)

* Update the woo.com theme link to include the back url

* Encode url to avoid losing the path param

* Add changefile(s) from automation for the following project(s): woocommerce

* Fix lint error

---------

Co-authored-by: github-actions <github-actions@github.com>
This commit is contained in:
Alba Rincón 2024-03-19 11:52:55 +01:00 committed by GitHub
parent 1d1f7ddc3b
commit f2a8c7fe36
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 10 additions and 3 deletions

View File

@ -0,0 +1,4 @@
Significance: minor
Type: update
[CYS] Update the woo.com themes link to include the back url

View File

@ -249,6 +249,9 @@ class OnboardingThemes extends \WC_REST_Data_Controller {
);
}
$in_app_purchase_params = \WC_Admin_Addons::get_in_app_purchase_url_params();
$in_app_purchase_params['wccom-back'] = rawurlencode( '/wp-admin/admin.php?page=wc-admin&path=/customize-store' );
$core_themes = array(
array(
'name' => 'Twenty Twenty-Four',
@ -308,7 +311,7 @@ class OnboardingThemes extends \WC_REST_Data_Controller {
'total_palettes' => 9,
'slug' => 'highline',
'thumbnail_url' => 'https://woo.com/wp-content/uploads/2023/12/Featured-image-538x403-1.png',
'link_url' => 'https://woo.com/products/highline/',
'link_url' => add_query_arg( $in_app_purchase_params, 'https://woo.com/products/highline/' ),
),
array(
'name' => 'Luminate',
@ -338,7 +341,7 @@ class OnboardingThemes extends \WC_REST_Data_Controller {
'total_palettes' => 5,
'slug' => 'luminate',
'thumbnail_url' => 'https://woo.com/wp-content/uploads/2022/07/Featured-image-538x403-2.png',
'link_url' => 'https://woo.com/products/luminate/',
'link_url' => add_query_arg( $in_app_purchase_params, 'https://woo.com/products/luminate/' ),
),
array(
'name' => 'Nokul',
@ -368,7 +371,7 @@ class OnboardingThemes extends \WC_REST_Data_Controller {
'total_palettes' => 6,
'slug' => 'nokul',
'thumbnail_url' => 'https://woo.com/wp-content/uploads/2022/11/Product-logo.jpg',
'link_url' => 'https://woo.com/products/nokul/',
'link_url' => add_query_arg( $in_app_purchase_params, 'https://woo.com/products/nokul/' ),
),
);