All posts in Tutorials

Get all WooCommerce Refunded orders

I ran into an interesting problem recently for a consulting project where the client needed to know what orders have had refunds processed in WooCommerce. While helping out with this problem, I found that there isn’t a great way to get all refunded orders at once, only to get refunds for a particular order. There are a couple ways you could approach this issue. Let’s start with the couple methods Keep Reading…

How to Add WooCommerce Custom Order Actions

If you’re building a plugin or internal tools for WooCommerce, it’s helpful to be able to run actions or shortcuts for order records, as this is what much of your day-to-day management is concerned with. Today we’ll look at how to add WooCommerce custom order actions so that you could modify order data, add information to orders, send order data externally, or run any general action that requires order details. Keep Reading…

Importing WooCommerce URL Coupons Data

Last week we released version 2.4.0 of WooCommerce URL Coupons, which adds support for importing coupon URL data. Our URL Coupons documentation has a guide to how importing should work, but we’ll go over it in a bit more detail in this quick tutorial. You’ll need to have both URL Coupons (v2.4.0+) and Customer / Coupon / Order CSV Import (v3.1.0+) installed and activated already. Building the Import File To Keep Reading…

Disable Repeat WooCommerce Purchases for a Product Category

We previously wrote up a tutorial on preventing repeat purchases for a particular WooCommerce product, or for any product in your store. However, based on the comments there, some merchants wanted to disable repeat WooCommerce purchases for a set of products, but not all products. In order to do so, you could use a product category to check whether repeat purchases should be allowed or not. This would let you Keep Reading…

Hide WooCommerce Product Reviews Until Purchase

We’ve got an Ask SkyVerge questions queued up for today from Sam: Is there a way to display the WooCommerce review tab only for customers who bought the product? That way users who never bought the product will not be able to see the review tab. Product reviews are one of the most important indicators of social proof for an eCommerce site, and they’re an excellent tool to help customers Keep Reading…

Prevent WooCommerce Checkout for Add-on Products

Today’s Ask SkyVerge question comes from Ian (I’m paraphrasing it a bit though): Is there a way to prevent purchase if a customer only has certain products in the cart? I sell ink cartridges as add-ons for printers, but these should not be purchased alone. I tried using a grouped product, but a customer could only order cartridges or remove the main product from the cart. Can checkout require another Keep Reading…

Add Member Area Links to the Sidebar with WooCommerce Memberships

When a customer has at least one membership assigned or purchased via WooCommerce Memberships, the customer will be able to see the “My Memberships” table via the account dashboard. This lets your members see membership information, and if you have the member area enabled, members can get lists of their available content, products, and discounts. However, some sites use both Memberships and WooCommerce Subscriptions and may want to remove this Keep Reading…

Checking if the WooCommerce Cart Contains a Product Category

While many plugins treat all products as if they’re the same, your client may not want to for your store’s needs. For example, shop owners may want to show Checkout Field Editor fields only for certain product types, show a mailing list opt in for membership products only, or add a banner at checkout if a customer is purchasing an item from a specific category. As such, it can be Keep Reading…

How to Create a Simple WooCommerce Payment Gateway

This is post 8 of 8 in the series “Build a WooCommerce Extension” Within our series on building a WooCommerce extension, we’ve talked about using classes while building a widget and while creating a complex shortcode. Today we’ll take a look at building a simple WooCommerce payment gateway integration, as this will give us an opportunity to extend a WooCommerce class. WooCommerce gives you several core classes, such as payment Keep Reading…

Change the default WooCommerce External Product Button

This is an Ask SkyVerge question from Manuel: How can I change the add to cart button for external products? I need to use something besides “Buy product” for my external products. The good news here is that there’s already a setting for your WooCommerce external products to change the button text. When you edit the product, you can enter the button text while creating it, right after you enter Keep Reading…