6 Popular WooCommerce Payment Gateways

As you probably already know, WooCommerce offers the easiest way to build an online store with WordPress.

Depending on your individual needs, WooCommerce allows you to add digital products as well as subscriptions. One of the most important components of your store is the payment gateway you use.

This is what offers your shoppers a secure shopping experience by connecting your store to an online payment service where they can pay for their orders, safely and securely.

What is a WooCommerce Payment Gateway?

WooCommerce payment gateways work by verifying the billing information for every customer, approving requests and ensuring you get paid.

The type of WooCommerce payment gateway to choose depends on several factors which include how easy it is to integrate with WooCommerce, the target clients you serve, related costs and the level of security you need.

Continue reading 6 Popular WooCommerce Payment Gateways

WooCommerce: Enable Payment Gateway Only for “Order Pay Checkout”

I invoice clients via WooCommerce, and then send them the “Invoice Email”, which takes them to the “Order Pay” page. Of course, I want to give them the option to pay via “Bank Transfer” (bacs), but I don’t want this to be visible on the default checkout page.

We’ve seen in the past how to disable payment gateways given certain conditions… but how do we “enable” one? Here’s a snippet for that – enjoy!

Continue reading WooCommerce: Enable Payment Gateway Only for “Order Pay Checkout”

WooCommerce: Add Checkout Fee for a Payment Gateway (e.g. PayPal)

Here’s a simple PHP snippet to add a fee to the checkout for every payment or for a specific payment gateway. Please do remember that for certain payment gateways such as PayPal, adding checkout fees is currently against their Terms of Service so make sure to check this first. As usual, this needs to be copied and pasted in your child theme’s functions.php file. Enjoy! Continue reading WooCommerce: Add Checkout Fee for a Payment Gateway (e.g. PayPal)

WooCommerce: Fixing Fatal error Call to undefined function wc_get_order()

I developed a custom payment gateway plugin for a client, who wanted to add a similar method to “cod” (cash on delivery). FYI, he wanted to add a method called “card on delivery”. I simply duplicated the code, added the PHP to a file, made a plugin and gave him the plugin zip file. And everything was working great… until he did a test checkout. Continue reading WooCommerce: Fixing Fatal error Call to undefined function wc_get_order()

WooCommerce: Disable Payment Gateway for Specific User Role

You may want to disable payment gateways depending on the user role or user capability. For example, you may want to disable PayPal for “user role: shop_manager” or enable a specific gateway for “user role: customer”. All you need is pasting the following code in your functions.php Continue reading WooCommerce: Disable Payment Gateway for Specific User Role

WooCommerce: Disable Payment Gateway for a Specific Country

You might want to disable PayPal for non-local customers or enable a specific gateway for only one country… Either way, this is a very common requirement for all of those who trade internationally.

Here’s a simple snippet you can further customize to achieve your objective. Simply pick the payment gateway “slug” you want to disable/enable (“paypal”, “authorize”, “stripe”, etc.) and the country code (US, ES, IE, etc.) and then apply your conditional rules in the plugin below.

Continue reading WooCommerce: Disable Payment Gateway for a Specific Country