Tips and Tricks HQ Support Portal › Forums › WP eStore Forum › WP eStore Tweaks › How to Set default payment Gateway Option?
- This topic has 9 replies, 7 voices, and was last updated 5 years, 2 months ago by admin.
June 15, 2011 at 8:44 pm #3600Karen ClarkMember
Is there a way to set the first option on the payments drop down to be a certain thing? Right now the default is PayPal but I would like my Authorize.net to appear first, with PayPal and Manual underneath those options. Thanks!June 16, 2011 at 2:47 am #33407amin007Participant
Here is how you can set a payment gateway to be the default one (when you are offering multiple gateway options).
Add the following block of code in your theme’s functions.php file which will set authorize.net as the default selected option:
$gateway = 'authorize';
Setting Another Payment Gateway as the Default
You can change the word
authorizewith one of the following to set a different gateway as the default option:
paypal(standard PayPal checkout)
authorize(standard authorize.net checkout)
pppro(PayPal Pro checkout)
auth_aim(authorize.net AIM onsite checkout)
stripe_basic(Stripe popup checkout)October 28, 2014 at 2:01 pm #33408jfolletteMember
Why is there not a simple checkbox option to select a default payment gateway rather than having to edit code?March 16, 2015 at 11:48 am #33409premierwebMember
I have two payment methods – Direct Deposit and PayPal. Direct deposit is displayed as the first choice but I would like PayPal to be displayed first.
If I add the following block of code to my theme’s functions.php filI presume this will be overwritten whenever the theme is updated:
$gateway = ‘authorize’;
Can you please suggest another way to do this? I use Version v7.1.7 of WP eStore.
ThanksMarch 16, 2015 at 12:04 pm #33410wzpModerator
The code has to go someplace. And there is really no place “safe” from being overwritten by updates. That’s why, as a business owner, you need to exercise good configuration management controls. After you make the initial changes, simply make a backup of the file. Whenever you update the theme, which should not be very often, simply compare the 2 files and re-implement the modifications if necessary.March 16, 2015 at 12:07 pm #33411premierwebMember
Understandable. Great advice as usual! Thanks very much.March 16, 2015 at 10:56 pm #33412adminKeymaster
You can create a custom little plugin where you add all your custom tweaks. Since it will be your own little plugin with your tweaks, it will never get overwritten by an update.January 29, 2016 at 5:23 pm #33413jharriesMember
Great stuff. It constantly amazes me: no matter how obscure the little detail I want to change to make my business work better, a search of this forum yields a solution a good 80% of the time.
JohnMarch 17, 2018 at 3:22 pm #33414jharriesMember
Is there a code to make Strip Basic the default payment method instead of Paypal? I tried “stripe” but that seems to only work with normal stripe.
I also looked in the code, but was not smart enough to find it.
JohnMarch 18, 2018 at 5:16 am #33415adminKeymaster
Use the following:
- You must be logged in to reply to this topic.