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

Use of Stripe Checkout results in address fields getting lost and cannot geocode #63

Open
3 tasks done
JarrydLong opened this issue Sep 15, 2022 · 2 comments
Open
3 tasks done

Comments

@JarrydLong
Copy link
Contributor

Describe the bug
We seem to lose the address during checkout when being redirected to the Stripe Checkout page.

To Reproduce
Steps to reproduce the behavior:

  1. Have Stripe Checkout enabled
  2. Have your billing fields on the checkout page enabled and Membership Maps configured with API key working
  3. Proceed through checkout.
  4. The address won't be geocoded. Debugging this results in an INVALID_REQUEST due to the address parts missing.

Screenshots
N/a

Expected behavior
Address fields should still be geocoded during checkout when using Stripe Checkout.

Isolating the problem (mark completed items with an [x]):

  • I have deactivated other plugins and confirmed this bug occurs when only Paid Memberships Pro plugin is active.
  • This bug happens with a default WordPress theme active, or Memberlite.
  • I can reproduce this bug consistently using the steps above.

WordPress Environment
PMPro 2.7.4
Membership Maps 0.4

@JarrydLong
Copy link
Contributor Author

Stripe Checkout does not store the billing address fields in the order at this point in time.

The Membership Maps Add On relies on billing address data being present in the order before it can geocode the address.

A workaround for this is to make use of the following code recipe and obtain the address values via the $_REQUEST variable, rather than accessing it from the order.

https://gist.github.com/JarrydLong/d5fad10c3674fc5c6ac1ae587135fc32

@JarrydLong
Copy link
Contributor Author

Adding to this.

When using Stripe Checkout, you should enable the Billing Address fields and have them show up on Stripe's Checkout.

The gateway has been built to store that set of address fields in the order. Which can then be geocoded without any code recipes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants