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

Feature: Subscriptions support #50

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

jdgc
Copy link
Contributor

@jdgc jdgc commented Apr 23, 2022

Adds support for handling of subscription products.

Flow:

  • If subscription product is in the user's cart, will redirect to payment details collection page (customer mode)
  • save token to subscription "parent order" metadata
  • process parent order payment immediately with token, including any non subscription products
  • subscription is "activated" on state transition of parent order. billing cadence is handled entirely by woocommerce configuration/api
  • when a renewal payment event is triggered, event handler will read token from the metadata of parent order attached to subscription associated with the renewal order and use it to process payment

Note that each renewal payment has its own state and exists independently as an order, so this flow should work for all payment methods that customer mode supports.

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.

1 participant