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

Using filters to collect cart endpoint data using StoreAPI #3840

Merged
merged 6 commits into from
Feb 10, 2025

Conversation

wjrosa
Copy link
Contributor

@wjrosa wjrosa commented Feb 5, 2025

Changes proposed in this Pull Request:

This is a simple PR that makes use of the new filter introduced in #3780 (wcstripe.express-checkout.cart-add-item) to replace some parts of the code. It is heavily inspired by the WooPayments version.

Testing instructions

  • Checkout and build this branch on your test environment (dev/implementing-filters-when-calling-cart-store-api)
  • Connect your Stripe account
  • Enable express payment methods (Google Pay, Amazon Pay, Link, Apple Pay)
  • As a shopper, access the store using a public-facing address
  • Confirm you can purchase products using the product, cart, and checkout pages. On both classic/shortcode and blocks version

  • Covered with tests (or have a good reason not to test in description ☝️)
  • Added changelog entry in both changelog.txt and readme.txt (or does not apply)
  • Tested on mobile (or does not apply)

Post merge

@wjrosa wjrosa self-assigned this Feb 5, 2025
@wjrosa wjrosa marked this pull request as ready for review February 5, 2025 20:01
@wjrosa wjrosa requested review from a team and diegocurbelo and removed request for a team February 5, 2025 20:03
Copy link
Member

@diegocurbelo diegocurbelo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code looks good, and it test well (product and cart/checkout - for both shortcode and blocks) 🚢

@wjrosa wjrosa merged commit beb2828 into develop Feb 10, 2025
37 checks passed
@wjrosa wjrosa deleted the dev/implementing-filters-when-calling-cart-store-api branch February 10, 2025 12:06
annemirasol pushed a commit that referenced this pull request Feb 12, 2025
* Using filters to collect cart endpoint data using StoreAPI

* Fix product page ID retrieval

* Adding specific unit tests

* Changelog and readme entries

* Reverting part of the hooks since it is required by the legacy endpoint

---------

Co-authored-by: Diego Curbelo <diego@curbelo.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants