This repository was archived by the owner on Feb 23, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 215
This repository was archived by the owner on Feb 23, 2024. It is now read-only.
Store notices container always shows as an error #11768
Copy link
Copy link
Closed
Labels
block: cartIssues related to the cart block.Issues related to the cart block.block: checkoutIssues related to the checkout block.Issues related to the checkout block.focus: blocksSpecific work involving or impacting how blocks behave.Specific work involving or impacting how blocks behave.type: bugThe issue/PR concerns a confirmed bug.The issue/PR concerns a confirmed bug.type: good first issueThe issue is a good candidate for the first community contribution/for a newcomer to the team.The issue is a good candidate for the first community contribution/for a newcomer to the team.
Description
Describe the bug
If a notice with status: success is created, it still shows the red, error state.
To reproduce
Steps to reproduce the behavior:
- Go to the Cart block.
- In the JS console type:
wp.data.dispatch('core/notices').createSuccessNotice( 'This is a success message, it should show in green!', { context: 'wc/cart' } ) - See the "error" notice display even though it should be success.
Expected behavior
The notices should show the correct type.
Screenshots
Additional context
Removing this 'error' value and using the shorthand status instead will fix this - there is a TS error that should be fixed when doing that though.
agung2001, jkohlbach, junixdev, paulg-rymera and SuperSambat
Metadata
Metadata
Assignees
Labels
block: cartIssues related to the cart block.Issues related to the cart block.block: checkoutIssues related to the checkout block.Issues related to the checkout block.focus: blocksSpecific work involving or impacting how blocks behave.Specific work involving or impacting how blocks behave.type: bugThe issue/PR concerns a confirmed bug.The issue/PR concerns a confirmed bug.type: good first issueThe issue is a good candidate for the first community contribution/for a newcomer to the team.The issue is a good candidate for the first community contribution/for a newcomer to the team.