WooCommerce

How to Validate Payment Gateway Settings Fields

It seems like my complete payment gateway tutorial is not that complete after all. I didn’t mention there how you can validate payment gateway admin options.

For example let’s assume that we have to validate a USDT address of a TRON network. Here is how it should work:

Let’s assume that we’ve already added a field for a USDT address inside init_form_fields() method. Just like that:

Variation Change JavaScript Events

Sometimes you need to do some stuff when your WooCommerce product variation has been changed. Maybe only for a specific variation.

Primarily there are two JavaScript events that are triggered after a variation change.

Remove Post Type Slug from URLs

I’ve been asked about how to do it probably a million times. The question is how to make the URLs of your custom post types (or WooCommerce products) to look like Pages.

For example how to have example.com/t-shirt/ instead of example.com/product/t-shirt/.

In this tutorial I am going to provide you a complete guide! As an example we are going to remove /product/ from WooCommerce product URLs. But before we begin I would like to warn you that you have to avoid it if possible, because it may slows down the overall performance of your website and you have to be extra-careful when assigning a specific slug for your posts.

How to Create File Uploader on Checkout Page

In this tutorial I will show you step by step how to add a file uploader field to WooCommerce checkout page without any plugins.

Developing Decentralized Crypto Payment Gateway

Welcome to a detailed guide about setting up payments on the websites using cryptocurrency. First of all I will explain some basics to you and then we will create our own payment gateway for WooCommerce (it is a eCommerce platform for WordPress).

Create Orders Programmatically

In this tutorial we are going to dive deep into creating an order on your WooCommerce store completely via code. I already have a similar tutorial on my blog where we created a product programmatically.

First things first, you should know a very simple thing – yeah, orders is a WordPress custom post type and no, we can not use wp_insert_post() to create them. We have to use a CRUD layer for that. If it says nothing to you, please be patient, we’re going to dive into it in just a little bit.

Apply Coupons Programmatically

In this tutorial I am going to show so many different ways and conditions how you can apply coupons in WooCommerce.

But the very first thing you have to keep in mind is that coupons can be applied either to products in the cart or to products in an order.