Fix wrong query param in onboarding product api call (#35926)

* Fix wrong query param in onboarding product api call

* Add changelog

* Fix lint
This commit is contained in:
Chi-Hsuan Huang 2022-12-14 13:34:37 +08:00 committed by GitHub
parent 884d3f4237
commit 9070cff9c5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 2 deletions

View File

@ -0,0 +1,4 @@
Significance: patch
Type: fix
Fix wrong query param in onboarding product api call

View File

@ -88,10 +88,12 @@ class OnboardingProducts {
$woocommerce_products = wp_remote_get(
add_query_arg(
array(
'user-agent' => 'WooCommerce/' . WC()->version . '; ' . get_bloginfo( 'url' ),
'locale' => $locale,
'locale' => $locale,
),
'https://woocommerce.com/wp-json/wccom-extensions/1.0/search'
),
array(
'user-agent' => 'WooCommerce/' . WC()->version . '; ' . get_bloginfo( 'url' ),
)
);
if ( is_wp_error( $woocommerce_products ) ) {