From 0ccf740ef6a5c24f43818ff52d26300a5f860c0f Mon Sep 17 00:00:00 2001 From: Bero Date: Fri, 8 Apr 2022 13:25:01 +0200 Subject: [PATCH] Remove 'WooCommerce Addons Page' user-agent --- .../woocommerce/includes/admin/class-wc-admin-addons.php | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/plugins/woocommerce/includes/admin/class-wc-admin-addons.php b/plugins/woocommerce/includes/admin/class-wc-admin-addons.php index 9fca11d5ec8..ffe87e84046 100644 --- a/plugins/woocommerce/includes/admin/class-wc-admin-addons.php +++ b/plugins/woocommerce/includes/admin/class-wc-admin-addons.php @@ -38,8 +38,7 @@ class WC_Admin_Addons { $raw_featured = wp_safe_remote_get( 'https://woocommerce.com/wp-json/wccom-extensions/1.0/featured', array( - 'headers' => $headers, - 'user-agent' => 'WooCommerce Addons Page', + 'headers' => $headers, ) ); @@ -82,8 +81,7 @@ class WC_Admin_Addons { $raw_featured = wp_safe_remote_get( 'https://woocommerce.com/wp-json/wccom-extensions/2.0/featured' . $parameter_string, array( - 'headers' => $headers, - 'user-agent' => 'WooCommerce Addons Page', + 'headers' => $headers, ) ); @@ -258,7 +256,7 @@ class WC_Admin_Addons { if ( ! empty( $section->endpoint ) ) { $section_data = get_transient( 'wc_addons_section_' . $section_id ); if ( false === $section_data ) { - $raw_section = wp_safe_remote_get( esc_url_raw( $section->endpoint ), array( 'user-agent' => 'WooCommerce Addons Page' ) ); + $raw_section = wp_safe_remote_get( esc_url_raw( $section->endpoint ) ); if ( ! is_wp_error( $raw_section ) ) { $section_data = json_decode( wp_remote_retrieve_body( $raw_section ) );