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

UPE: Missing equivalent to the wc_stripe_force_save_source hook #3502

Open
sebcode opened this issue Oct 4, 2024 · 0 comments
Open

UPE: Missing equivalent to the wc_stripe_force_save_source hook #3502

sebcode opened this issue Oct 4, 2024 · 0 comments

Comments

@sebcode
Copy link

sebcode commented Oct 4, 2024

Before switching to the new checkout experience we used add_filter('wc_stripe_force_save_source', '__return_true'); which attaches the stripe payment method to the stripe customer for our subscription service (we're not using the official Woocommerce Subscriptions plugin). There doesn't seem to be an equivalent hook for the new checkout experience.

For now as a hacky workaround I'm defining the functions wcs_order_contains_subscription, wcs_is_subscription, wcs_order_contains_renewal to make WC_Stripe_Subscriptions_Utilities_Trait::has_subscription() return true for certain orders. This causes the stripe plugin to set setup_future_usage:off_session for the payment intent which is what we want for our use case. It would be great if there would be a cleaner way to do that.

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

No branches or pull requests

1 participant