Simple Membership Plugin › Forums › Simple Membership Plugin › How to change Stripe payment method with hook
Tagged: hook stripe payment method
- This topic has 6 replies, 3 voices, and was last updated 1 year, 3 months ago by
carquisa.
-
AuthorPosts
-
March 12, 2025 at 8:55 pm #29906
carquisa
ParticipantHi everyone!
Can anyone help me with the swpm_stripe_sca_session_opts hook? I need to set the payment method to SEPA whenever it’s a subscription (2 different button IDs) and set the payment method to card whenever it’s a one time payment.
It’s my first time using wordpress hooks, I have seen this hook, but I don’t know how to write the options array to change it…
Thank you in advance!
March 12, 2025 at 10:26 pm #29907The Assurer
ModeratorAlthough Single Euro Payments Area (SEPA) is a mandate, it is not a regulatory requirement and only applies to the EU.
Our Stripe gateway does not support SEPA, but I will refer this to the developer; to see if there are any plans to support it.
March 12, 2025 at 10:36 pm #29908carquisa
ParticipantI’m already using SEPA payment with the Stripe SCA subscription button and it’s working fine.
My issue is that I don’t know how to set the options array for the payment method in the hook.
Thank you!
March 13, 2025 at 11:35 am #29922admin
KeymasterTry using the ‘payment_method_types’ parameter in the Stripe Buy Now button’s shortcode. Below is an example of how to use it:
[swpm_payment_button id="1234" payment_method_types="card"]If this works, it will be better than using the hook to override modify the code as that requires good PHP coding skill.
March 13, 2025 at 4:03 pm #29923carquisa
ParticipantThank you admin!
The solution is quite easy and it works perfectly!! Much more than coding the hooks… I also used the “sepa_debit” payment method for the subscription buttons and it worked too.
I didn’t found the information for this parameter in the Documentation, where is it?
March 14, 2025 at 7:25 am #29938admin
KeymasterGood to hear that it is solved.
The option I mentioned has been recently added to the plugin. It’s still on my todo list to add to our documentation.
March 14, 2025 at 7:56 am #29939carquisa
ParticipantI’m glad it just came out, it’s been the perfect moment for me.
Some users have already used the buttons and the payment has gone well.
Thank you!!
-
AuthorPosts
- You must be logged in to reply to this topic.