Skip to content
This repository was archived by the owner on Feb 23, 2024. It is now read-only.
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

@opr

Description

@opr

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:

  1. Go to the Cart block.
  2. In the JS console type: wp.data.dispatch('core/notices').createSuccessNotice( 'This is a success message, it should show in green!', { context: 'wc/cart' } )
  3. See the "error" notice display even though it should be success.

Expected behavior

The notices should show the correct type.

Screenshots

image

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.

https://github.com/woocommerce/woocommerce-blocks/blob/trunk/packages/checkout/components/store-notices-container/store-notices.tsx#L130

Metadata

Metadata

Assignees

Labels

block: cartIssues related to the cart block.block: checkoutIssues related to the checkout block.focus: blocksSpecific work involving or impacting how blocks behave.type: bugThe 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.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions