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
This commit is contained in:
parent
5002a1498a
commit
ea6b50f241
|
@ -0,0 +1,4 @@
|
||||||
|
Significance: patch
|
||||||
|
Type: Tweak
|
||||||
|
|
||||||
|
Show single success message for theme install and activation #8236
|
|
@ -110,17 +110,7 @@ class Theme extends Component {
|
||||||
path: '/wc-admin/onboarding/themes/install?theme=' + slug,
|
path: '/wc-admin/onboarding/themes/install?theme=' + slug,
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
} )
|
} )
|
||||||
.then( ( response ) => {
|
.then( () => {
|
||||||
createNotice(
|
|
||||||
'success',
|
|
||||||
sprintf(
|
|
||||||
__(
|
|
||||||
'%s was installed on your site',
|
|
||||||
'woocommerce-admin'
|
|
||||||
),
|
|
||||||
response.name
|
|
||||||
)
|
|
||||||
);
|
|
||||||
this.activateTheme( slug );
|
this.activateTheme( slug );
|
||||||
} )
|
} )
|
||||||
.catch( ( response ) => {
|
.catch( ( response ) => {
|
||||||
|
@ -140,8 +130,9 @@ class Theme extends Component {
|
||||||
createNotice(
|
createNotice(
|
||||||
'success',
|
'success',
|
||||||
sprintf(
|
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'
|
'woocommerce-admin'
|
||||||
),
|
),
|
||||||
response.name
|
response.name
|
||||||
|
|
Loading…
Reference in New Issue