UPE: Missing equivalent to the wc_stripe_force_save_source
hook
#3502
Labels
priority: medium
The issue/PR is medium priority—it affects lots of customers substantially, but not critically.
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 makeWC_Stripe_Subscriptions_Utilities_Trait::has_subscription()
returntrue
for certain orders. This causes the stripe plugin to setsetup_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.The text was updated successfully, but these errors were encountered: