Remitur Posted March 16, 2021 Share Posted March 16, 2021 (edited) Does exist any way to enable or disable a payment gateway for a user? I.e.: I have three gateways: paypal, banktransfer, stripe for user A, I would like to be available just paypal and banktransfer for user B, instead just banktransfer and stripe (note: A and B may be filtered according to country, or on a custom field... it doesn't matter, there're a number of different ways to do this filter. What I'm looking for is a way to temporarly disable a gateway for a customer in client area, in order to make impossible for him to use it) Edited March 16, 2021 by Remitur 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted March 16, 2021 Share Posted March 16, 2021 5 minutes ago, Remitur said: Does exist any way to enable or disable a payment gateway for a user? not from settings - you could do it with hooks.... although you might need multiple hooks to cover all eventualities, e.g.... remove unwanted gateways from cart. remove unwanted gateways from invoices. the first is relatively simple and i've posted multiple gateway hooks that can do that based on various conditions... the second can be an absolute pain with older versions, though I would imagine it's easier with recent versions using 21 (or child of). 1 Quote Link to comment Share on other sites More sharing options...
Remitur Posted March 16, 2021 Author Share Posted March 16, 2021 6 minutes ago, brian! said: not from settings - you could do it with hooks.... although you might need multiple hooks to cover all eventualities, e.g.... remove unwanted gateways from cart. remove unwanted gateways from invoices. Wonderful! It's exactly what I was looking for! (Note: definitely, this community needs a better search engine... just to find your precious previous posts! 😄 ) 0 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.