From ea6b50f24151cdf7296199fc0fc67f634efed363 Mon Sep 17 00:00:00 2001 From: Joshua T Flowers Date: Tue, 1 Feb 2022 12:02:33 -0500 Subject: [PATCH] Show single success message for theme install and activation (https://github.com/woocommerce/woocommerce-admin/pull/8236) * Show single success message for theme install and activation * Add changelog entry --- plugins/woocommerce-admin/changelogs/update-6599 | 4 ++++ .../client/profile-wizard/steps/theme/index.js | 15 +++------------ 2 files changed, 7 insertions(+), 12 deletions(-) create mode 100644 plugins/woocommerce-admin/changelogs/update-6599 diff --git a/plugins/woocommerce-admin/changelogs/update-6599 b/plugins/woocommerce-admin/changelogs/update-6599 new file mode 100644 index 00000000000..ab8a3bc4956 --- /dev/null +++ b/plugins/woocommerce-admin/changelogs/update-6599 @@ -0,0 +1,4 @@ +Significance: patch +Type: Tweak + +Show single success message for theme install and activation #8236 diff --git a/plugins/woocommerce-admin/client/profile-wizard/steps/theme/index.js b/plugins/woocommerce-admin/client/profile-wizard/steps/theme/index.js index 57dc13a4131..0cc2f401202 100644 --- a/plugins/woocommerce-admin/client/profile-wizard/steps/theme/index.js +++ b/plugins/woocommerce-admin/client/profile-wizard/steps/theme/index.js @@ -110,17 +110,7 @@ class Theme extends Component { path: '/wc-admin/onboarding/themes/install?theme=' + slug, method: 'POST', } ) - .then( ( response ) => { - createNotice( - 'success', - sprintf( - __( - '%s was installed on your site', - 'woocommerce-admin' - ), - response.name - ) - ); + .then( () => { this.activateTheme( slug ); } ) .catch( ( response ) => { @@ -140,8 +130,9 @@ class Theme extends Component { createNotice( 'success', sprintf( + /* translators: The name of the theme that was installed and activated */ __( - '%s was activated on your site', + '%s was installed and activated on your site', 'woocommerce-admin' ), response.name