Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

POC: Create client-side notices from notices added with wc_add_notice in Checkout block #46488

Draft
wants to merge 4 commits into
base: trunk
Choose a base branch
from

Conversation

opr
Copy link
Contributor

@opr opr commented Apr 11, 2024

Submission Review Guidelines:

Changes proposed in this Pull Request:

  • Create a processNotices function - this takes a list of notices in the format returned by wc_get_notices and uses the core/notices data store to add them on the client.
  • On error responses in checkout, process the notices.

Note, I have not done this for successful checkouts or other store API actions yet such as changing shipping method, this is only for showing notices added during payment failure.

How to test the changes in this Pull Request:

Using the WooCommerce Testing Instructions Guide, include your detailed testing instructions:

  1. Add woocommerce-failed-gateway.zip to your site
  2. Try to check out using the failed gateway method
  3. See the wc_add_notices notices added when payment fails.

Changelog entry

  • Automatically create a changelog entry from the details below.

Significance

  • Patch
  • Minor
  • Major

Type

  • Fix - Fixes an existing bug
  • Add - Adds functionality
  • Update - Update existing functionality
  • Dev - Development related task
  • Tweak - A minor adjustment to the codebase
  • Performance - Address performance issues
  • Enhancement - Improvement to existing functionality

Message

Comment

@github-actions github-actions bot added the plugin: woocommerce Issues related to the WooCommerce Core plugin. label Apr 11, 2024
@opr opr added focus: cart Issues related to the cart. focus: checkout Issues related to checkout page. team: Rubik Store API checkout endpoints, Mini-Cart, Cart and Checkout related issues block: cart Issues related to the cart block. block: checkout Issues related to the checkout block. labels Apr 11, 2024
@opr opr self-assigned this Apr 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
block: cart Issues related to the cart block. block: checkout Issues related to the checkout block. focus: cart Issues related to the cart. focus: checkout Issues related to checkout page. plugin: woocommerce Issues related to the WooCommerce Core plugin. team: Rubik Store API checkout endpoints, Mini-Cart, Cart and Checkout related issues
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant