WooCommerce: Disable Payment Gateway By Product Type

Ever wondered if you could toggle payment gateways based on whether a given “product type” is in the WooCommerce Cart? For example, disable PayPal if there are simple subscription products, or enable Stripe only when there are variable products?

Well, with this simple code (and the 2 examples) you find below, you can manage to achieve just that. The second example regards the WooCommerce Subscriptions plugin, as this requires some plugin-specific functions to check for the product type. Enjoy!

Continue reading WooCommerce: Disable Payment Gateway By Product Type

WooCommerce: Change Payment Gateway Order Status

Ok, we all know that Stripe, PayPal and all successful online payment orders go to “processing” order status, BACS and cheque go to “on-hold”, and so on. Each payment gateway has its own default paid status.

Now, what if you use custom order statuses, or what if you wish to change Stripe orders to “completed”, BACS orders to “pending” and PayPal orders to “on-hold”? Thankfully, this is super easy with a handy PHP snippet. Enjoy!

Continue reading WooCommerce: Change Payment Gateway Order Status

WooCommerce: Rename “Place Order” Based on Chosen Payment Gateway

We’ve already seen how to rename the “Place Order” button on the WooCommerce Checkout page, but today I want to find a way to rename it dynamically and conditionally i.e. based on the payment gateway that is selected while checking out.

The snippet requires the payment gateway “ID” – here’s a quick tut in case you don’t know how to retrieve that: How to Find WooCommerce Payment Gateway ID

Other than that, it’s pretty simple logic. Enjoy!

Continue reading WooCommerce: Rename “Place Order” Based on Chosen Payment Gateway

WooCommerce: Which PayPal Gateway Plugin is Better?

As a WooCommerce store owner, providing multiple payment gateway options to your customers is more than necessary to ensure high customer satisfaction. And one of the most widely accepted payment systems is PayPal. 

You don’t have to take our word for it – research suggests customers are 54% more likely to purchase your products and services if you accept PayPal payments in your store. So, the potential loss of customers and sales is significant if you don’t accept PayPal payments in your online store. 

PayPal lets you accept debit cards, credit cards, and even money through the wallet. Many businesses rely on it as customers have a lot of trust in the PayPal brand.

However, despite being an excellent payment gateway, enabling PayPal on your WooCommerce store and making it work as intended isn’t always easy, considering frequent PayPal checkout errors and the fact that the most popular WooCommerce PayPal plugin is no longer supported

To tackle these issues, we share the top WooCommerce PayPal plugins you can use in this article. These plugins will eliminate checkout errors and ensure high customer satisfaction. But first, let’s understand why using the official WooCommerce PayPal plugin is no longer the right choice. 

Continue reading WooCommerce: Which PayPal Gateway Plugin is Better?

WooCommerce: 5 Must-Knows to Develop a Payment Gateway From an API

A payment gateway is a system developed to enable payment of goods and services for both offline and online merchants. It makes sure that there exists a smooth passage of all transactions through encryption of confidential information. It acts as the link between a buyer, a bank, and an online shop.

Online stores try their best to sell as many products as possible to their customers. WooCommerce comes with built-in functionality and features such as store management and payment options that merchants need to get their stores up and running.

A shop using the WooCommerce plugin is the payment portal while the bank is the payment processor. The payment gateway receives data from the buyer and redirects it to the right payment processor depending on the method of payment that the buyer chooses.

So, let’s see what’s required from a technical and legal point of view before writing a single line of code.

Continue reading WooCommerce: 5 Must-Knows to Develop a Payment Gateway From an API

WooCommerce: 6 Popular 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 WooCommerce: 6 Popular 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: Disable Payment Gateway For Specific Shipping Method

Today we take a look at the WooCommerce Checkout Page and specifically at how to disable a payment gateway (for example PayPal) when a specific shipping method is selected (e.g. “local_pickup”).

Specifically, you will learn how to “get” the selected shipping method on the go (thanks to “sessions”), and also how to “unset” a payment gateway. Enjoy!

Continue reading WooCommerce: Disable Payment Gateway For Specific Shipping Method

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: Disable Payment Gateway by 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 by Country

WooCommerce, Shopify, Wix: A Step-by-Step Guide to Launching Your Ecommerce Business

Almost 25% of retail sales are expected to happen online by 2026, so you should create a web store if you run a small business. With the right tools, any merchant can start selling online. 

A good ecommerce website-building platform will let you list products, process payments, and organize shipping without leaving your home or store. 

But with so many platforms – WooCommerce, Shopify, Wix, and more – choosing the right one can feel overwhelming.

This guide focuses more on the steps that are required to publish your first ecommerce website with any of these solutions, so you can hit the ground running and start selling today!

Continue reading WooCommerce, Shopify, Wix: A Step-by-Step Guide to Launching Your Ecommerce Business

WooCommerce: Retrieve Paid Orders Only

The wc_get_orders function is the recommended method for fetching orders in WooCommerce due to its flexibility, safety, and adherence to best practices. It offers several advantages over using custom WP_Query or database queries. It’s also HPOS compatible.

You can specify various arguments to filter orders based on properties like status (pending, completed, on-hold, etc.), customer (ID, email), date range, order IDs, payment method, total, custom fields and more.

Today, I’d like to talk about paid orders – at the moment there is no way to filter out free orders with a wc_get_orders parameter, so we need to find a workaround.

My solution uses the “payment_method” parameter, which accepts a payment method ID (cheque, bacs, afterpay, paypal, stripe, woocommerce_payments, ppcp-gateway, klarna_payments, etc. based on the payment gateway plugins you use). Clearly, an order that comes with a specific payment method is a paid order.

Unfortunately you can only select one payment method (as opposed to an array), so we also need to do some array merging. Enjoy!

Continue reading WooCommerce: Retrieve Paid Orders Only

WooCommerce: Send Pending Order Email Automatically

The “Customer invoice / Order details” WooCommerce email notification is often used for manually sending payment requests to customers – it’s not automatically triggered like other WooCommerce emails. You can access it from the individual order screen under the “Order Actions” section.

In certain cases, however, you’d want to make it automatic. And I don’t know why it’s not like that by default. So, let’s fix it: if you create a manual order from the backend, set it as pending, add some products to it and “Save”, the email notification will trigger on its own thanks to the snippet below. Enjoy!

Continue reading WooCommerce: Send Pending Order Email Automatically

WooCommerce: No Default Shipping @ Checkout Page

We already saw how to disable the default payment gateway in the WooCommerce Checkout page, so that users are forced to click on one of the options.

Well, we can do the exact same with the shipping methods!

In this way, customers will be forced to actually click on one of the shipping options. This is helpful when you don’t want to have a default shipping, and when your customers often “forget” to pick the correct one and ask to change it once the order has been placed.

Enjoy!

Continue reading WooCommerce: No Default Shipping @ Checkout Page

WooCommerce: No Default Payment @ Checkout Page

When you land on the WooCommerce Checkout page, one payment option (radio button) will be selected by default. this is defined based on the last payment method (logged in customer), or the payment gateway sorting (logged out customer).

Often it happens, however, that customers forget to change their payment selection, and therefore end up checking out with the wrong payment option. Which means, more admin work.

With this simple snippet, we will inject some JS in the Woo Checkout page, so that on load, all payment method radio inputs will be unchecked. Super easy!

Continue reading WooCommerce: No Default Payment @ Checkout Page

WooCommerce: Getting Started As An Expert – A Complete Guide

If you’re looking to start your own ecommerce store, no platform does it better than WooCommerce.

WooCommerce is your path to online selling success. It’s a flexible, open-source e-commerce plugin specifically built for WordPress websites. 

From setting up and customizing your shop, to mastering orders and sales tracking, this complete guide will walk you through becoming an accomplished WooCommerce expert.

Read on for all the info you need to get the ball rolling!

Continue reading WooCommerce: Getting Started As An Expert – A Complete Guide

WooCommerce: Get EU, EU VAT, EEA, SCA Countries

When you deal with conditional payment gateways, or conditional notifications, or conditional content, you may need to use to check the current billing country against an array of countries (in plain English, you may want to know if the customer is based in a specific World area), such as the European Union.

Thankfully, WooCommerce gives us a nice prebuilt function so that we don’t need to create the array of EU countries manually. On top of that, it’s easy to manipulate that array in order to add / remove countries for different uses, such as getting the list of EEA (European Economic Area) countries or SCA (Strong Customer Authentication) countries. In this post, I will give you some shortcuts to “calculate” these arrays, so that you don’t need to bother doing it.

Please note, EU, EEA and SCA countries are constantly changing, so these arrays are updated to the date you see on top of this post. Enjoy!

Continue reading WooCommerce: Get EU, EU VAT, EEA, SCA Countries

WooCommerce: Turn Checkout Into a Quote System

There are certainly ways and plugins to turn WooCommerce into a quote engine, but today I want to share a super simple workaround that could be helpful to many.

In a nutshell, we’ll use the same WooCommerce cart/checkout flow, rename a few strings and buttons, enable an offline payment gateway (so there is no actual payment), let the admin revise the order and send back the final invoice, and finally get the customer to pay for their order.

Enjoy!

Continue reading WooCommerce: Turn Checkout Into a Quote System

WooCommerce: How to Automate Upsells and Discounts?

We all want to grow our WooCommerce store sales but creating offers for thousands of products is a nightmare.

What if I said you can grow sales on autopilot and without pouring sweat and money into your business?

This post covers how you can set up automated WooCommerce upsells, discounts, order bumps and other offers – so that you can focus on other aspects of your business while your website does its magic.

Select from ready-made offers, run them on your sites, count your sales, relax.

Without further delays, let’s get started.

Continue reading WooCommerce: How to Automate Upsells and Discounts?