Commit 2e7996253d8 for woocommerce
commit 2e7996253d8df38db1c3a19d145182b80bc183e8
Author: Ann <annchichi@users.noreply.github.com>
Date: Thu Apr 30 00:10:22 2026 +0800
Fix: replace developer-facing plugin install error with merchant-friendly copy (#64186)
* Fix: replace developer-facing plugin install error with merchant-friendly copy
The "Plugin API call failed" message is shown to merchants when WordPress.org
Plugin API is unreachable. Replace it with actionable copy that explains the
issue is temporary and suggests trying again or using the Extensions page.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* Add changelog entry for plugin install error copy fix
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* Rephrase plugin install error and mirror to onboarding telemetry
- Lead with "We couldn't install…" instead of a bare slug, addressing
review feedback that the raw plugin slug at sentence start read
awkwardly.
- Apply the same merchant-friendly copy to
OnboardingPlugins::log_plugins_install_api_error() so the
coreprofiler_install_plugin_error Tracks event stays in sync with
install_plugin_error (both cited as the PR's data source).
* Update plugin install error copy for clarity and consistency
---------
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
diff --git a/plugins/woocommerce/changelog/fix-plugin-install-error-message-copy b/plugins/woocommerce/changelog/fix-plugin-install-error-message-copy
new file mode 100644
index 00000000000..18c28e59a40
--- /dev/null
+++ b/plugins/woocommerce/changelog/fix-plugin-install-error-message-copy
@@ -0,0 +1,4 @@
+Significance: patch
+Type: fix
+
+Replace developer-facing "Plugin API call failed" error with merchant-friendly copy that explains the issue and suggests next steps.
diff --git a/plugins/woocommerce/src/Admin/API/OnboardingPlugins.php b/plugins/woocommerce/src/Admin/API/OnboardingPlugins.php
index bd6a99d2f3d..385a133acc4 100644
--- a/plugins/woocommerce/src/Admin/API/OnboardingPlugins.php
+++ b/plugins/woocommerce/src/Admin/API/OnboardingPlugins.php
@@ -396,7 +396,7 @@ class OnboardingPlugins extends WC_REST_Data_Controller {
'error_message' => sprintf(
// translators: %s: plugin slug (example: woocommerce-services).
__(
- 'The requested plugin `%s` could not be installed. Plugin API call failed.',
+ 'We couldn\'t install `%s`. Try again in a few minutes, or install it later from the Extensions page.',
'woocommerce'
),
$slug
diff --git a/plugins/woocommerce/src/Admin/PluginsHelper.php b/plugins/woocommerce/src/Admin/PluginsHelper.php
index 69abcf5dfdb..3a71e1cd55e 100644
--- a/plugins/woocommerce/src/Admin/PluginsHelper.php
+++ b/plugins/woocommerce/src/Admin/PluginsHelper.php
@@ -286,7 +286,7 @@ class PluginsHelper {
'error_message' => sprintf(
// translators: %s: plugin slug (example: woocommerce-services).
__(
- 'The requested plugin `%s` could not be installed. Plugin API call failed.',
+ 'We couldn\'t install `%s`. Try again in a few minutes, or install it later from the Extensions page.',
'woocommerce'
),
$slug
@@ -308,7 +308,7 @@ class PluginsHelper {
$error_message = sprintf(
/* translators: %s: plugin slug (example: woocommerce-services) */
- __( 'The requested plugin `%s` could not be installed. Plugin API call failed.', 'woocommerce' ),
+ __( 'We couldn\'t install `%s`. Try again in a few minutes, or install it later from the Extensions page.', 'woocommerce' ),
$slug
);