This gist has been migrated to a repo here.
-
-
Save thenbrent/6641526 to your computer and use it in GitHub Desktop.
I searched for 'where to find the slug' and found it by myself in the URL at the end. In Woocommerce/settings/payments click on the payments you can choose from and have a look at the different URLs. For paypal it ends on: wc_gateway_paypal for another: wc_gateway_bacs (e.g. slug for paying by check is 'bacs').
good morning experts,
i like this code or plugin. and i use it already on my subscriptions.
Sorry but i am not a expert...so my question is how i can change the code so that I can also use it for "bacs" and costume "wcCpg1". Thanks for your Help.
regards
Carsten
Hi, where do I insert this code? Does it go in the functions.php file of my theme?
Thanks!
Sebastian
I was able to do it, just created a new folder inside the wp-content/plugins folder, named: "woocommerce-disable-paypal-for-subscriptions" and placed the woocommerce-disable-paypal-for-subscriptions.php file with the code above inside the folder. Just a comment: the code is missing the ?> at the end.
Then simply go to your plugins in WordPress and activate it!
Sorry if this is too simple, but it may help others :)
Hi,
Does this plugin still allow existing active subscriptions to be renewed via Paypal? Will it only stop new Paypal customers subscribing?
Thanks
Thank you SO MUCH for this, spent hours trying to figure out where the form for a change of payment method with $0 balance was being pulled from so I could disable paypal there (successful initial signup with $0 due, and changing payment method before first renewal charge hits), and as a bonus stumbled upon a wealth of other snippets useful for for the sub plugin. Thanks! (I know you're the author, I wish I had bothered to look here first before I spent hours sorting through code... have bookmarked it now!)
An update for others who may find this, the shorter solution I posted above no longer works in Subscriptions 2.x.
This plugin works with 2.0 though? We're just adding it to a site which is heading towards 2.0.
Okay, this works, in checkout, but has been pointed out today that it doesn't remove it from the "Update Payment" screen in My Account > Subscriptions. About to roll sleeves up and add that... unless anyone has already fixed that?! ;)
Hi folks, given the amount of discussion on this gist, I'm moved it to a GitHub repo where it's history is more easily traced and we can use Issues etc. to track discussions. Find it here: https://github.com/Prospress/woocommerce-subscriptions-disable-paypal
Good point by silicondales!
Does anyone know a way of how to also remove paypal in the MyAccount > Update Payment section? That would be amazing.
Sorry for posting on here thenbrent but I could not see any posts under the other link :/
Any help would be massively appreciated!
Hi Guys,
I run a multisite and want my subsite users to user only the IPG I provide. I Want to disable default Payment options in woocommerce like, BANK dep.,cheque, paypa etc. can some one guide me
Regards
George