Skip to content

Conversation

@mattallan
Copy link

@mattallan mattallan commented May 13, 2024

All Submissions:

  • Does your code follow the Extendables standards?
  • Have you written new tests for your changes, as applicable?
  • Have you successfully run tests with your changes locally?

Changes proposed in this Pull Request:

In WooCommerce Subscriptions we have a setting that allows customers to purchase $0 subscription products (i.e. subscriptions that have a trial period) without entering a payment method on the checkout:
image

After the free trial ends, when the customer pays for the first renewal order with Amazon Pay, the new payment method is not set on the subscription resulting in the subscription remaining as requiring manual renewal, instead of automatically renewing with Amazon Pay.

I recorded my screen to showcase the issue:

Screen.Capture.on.2024-05-13.at.15-07-18.mp4

This PR fixes this issue by making sure Amazon Pay is also set as the payment method of the subscription when also copying over the payment method meta from the order.

Closes #283

How to test the changes in this Pull Request:

  1. Install and activate the latest WooCommerce Subscriptions extension
  2. Enable the $0 checkout setting in WooCommerce > Settings >Subscriptions
  3. Create a subscription product with a 7-day free trial
  4. Purchase the subscription with no payment method.
  5. You will see the trial and next payment date. The subscription will be in "manual payment" mode which is expected.
  6. Manually trigger the subscription renewal using the "Process renewal" subscription action:
    image
  7. Now pay for the new pending renewal order from My Account page and complete the payment with Amazon Pay
  8. Check the subscription on the My Account page and confirm the payment method is set to Amazon Pay:
    image
  9. Process another renewal and confirm Amazon pay processing the renewal automatically.

Other information:

  • Have you checked to ensure there aren't other open Pull Requests for the same update/change?

Changelog entry

Fix - Paying for a manual renewal after a free trial doesn't save Amazon Pay as the payment method

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.

Paying for renewal payment after free trial doesn't save Amazon Pay as the payment method & stays in manual renewal

1 participant