WooCommerce: Capitalize All Product Names

When you deal with WooCommerce websites, you also need to look into design, readability, and accessibility. And if you have hundreds or thousands of products, you probably need to set some global rules so that you don’t need to worry about editing each product manually.

One rule could be the way product titles are displayed. Maybe you have a mix of capitalized product names (“Red Square Table”), non-capitalized ones (“White round chair”) and all caps ones (“GREEN COUCH”), and therefore you’re looking for a PHP shortcut to fix this automatically.

So, here’s a super simple solution to capitalize all product titles. Enjoy!

Continue reading WooCommerce: Capitalize All Product Names

WooCommerce: Products Attributes in a Shortcode

Products attributes display on the single product page whenever attribute terms are assigned to a given WooCommerce product. This is the default behaviour.

However, what if you want to show the product attribute table somewhere else? For example, in a blog post, or in a custom pricing table?

Well, we can build a shortcode for that – simply specify a product ID and the shortcode will magically output its attributes. Enjoy!

Continue reading WooCommerce: Products Attributes in a Shortcode

WooCommerce: Count External Product Clicks

Yeah Google Analytics is cool, but have you ever coded your own tracking functions within your WooCommerce website?

An example may be counting the number of times customers click on the “Buy product” button that displays on the Single External Product Page, and show the counter in the Products Table in the backend.

For example, I use this to calculate the Click Through Rate (% clicks / views) and see how popular an external product is. Of course, you could also decide to extend the counter to all products (simple, variable, etc.) and count the number of times customers click on the Add to Cart, but for today let’s stick to the external products count. Enjoy!

Continue reading WooCommerce: Count External Product Clicks

WooCommerce: Display All Single Variations (Shortcode)

By default, the WooCommerce Shop page displays simple, variable, grouped, bundle and other product types. As you know, each variable product is made of one or more “single variations”, and these are only visible in the single product page.

Now, what if you want to display a grid of all “single variations” in a custom page / post? Well, a shortcode can be coded so that you can achieve just that. Enjoy!

Continue reading WooCommerce: Display All Single Variations (Shortcode)

WooCommerce: Allow Customers To Define the Product Price

This is a great customization for those WooCommerce store owners who are willing to accept donations, custom amounts, or need anyway that the customer enters a custom price on the product page for paying an invoice or a bill.

This is as simple as creating a simple product with $0 price, and after that using the snippet below to display an input field on the single product page, where customers can enter their custom amount. Enjoy!

Continue reading WooCommerce: Allow Customers To Define the Product Price

WooCommerce: Get Product Parent Categories

Whenever we need to do custom WooCommerce work, remembering how to get “things” is the most time-consuming task. So, a Google search often helps us find the right and quickest solution.

For example, it’s easy to “get the current product’s categories“, but how can we get the “parent product categories” only? In today’s snippet we will see how this can be achieved in 7 lines of PHP. Enjoy!

Continue reading WooCommerce: Get Product Parent Categories

WooCommerce: Why Variable Products Are Too Limited (and How Add-Ons Can Help)

WooCommerce is rich with customization options for different kinds of eCommerce businesses. However, it’s quite limited when it comes to certain shopping solutions your online business may need – such as displaying product variations.

For instance, a customer may need to choose RAM size, storage size, and device color before buying a mobile phone. In this case, using the default WooCommerce variations will require you to create a variable product with hundreds if not thousands of attribute combinations.

This can be exhausting, and despite all that work, the result is often a slow and difficult to manage product backend due to a huge number of variations . Besides, your customers would have a hard time finding the exact variation when the only option they have are dropdowns with dozens of options.

The best way to give your customers a seamless user experience is to allow them to customize their products on the same page without using variations. Now, you can’t do that with WooCommerce alone. This is where WooCommerce product add-ons plugins come in.

In this article, we’ll show you the easiest way to create and sell variable WooCommerce products using WooCommerce Product Options. But before that, let’s talk about why you need additional product options in your store.

Continue reading WooCommerce: Why Variable Products Are Too Limited (and How Add-Ons Can Help)

WooCommerce: Display Product ACF Value @ Shop Page

We already talked about displaying an ACF field on the single product page. This time around, we’ll do the exact same but for the product loop pages (shop, category, tag, etc.). ACF (Advanced Custom Fields) is an awesome plugin to create and manage custom fields, so this is definitely a tutorial that will help many WooCommerce developers.

Please note that if ACF is not active, the snippet will break the site. There is a way to make it trigger only when ACF plugin is active, just so you know. Anyway, let’s see how we can display the value of a product ACF inside the loop. Enjoy!

Continue reading WooCommerce: Display Product ACF Value @ Shop Page

WooCommerce: Override Product Category Page Title

This is an interesting WooCommerce customization – as you know WordPress menus and widgets read whatever product category name and display it in the frontend.

Let’s say your product category title is “Tables”. This will show up in the navigation menu if you have set it up that way, in te breadcrumbs if you have any, in the sidebar category widgets, and as a title on the single product category page.

This is great and all, but what if your product category name is “Red Round Tables By Whatever Brandname“? As you can imagine, displaying this in a sidebar or navigation menu may be a little too much, while it’s fine to use it as a H1 on the single product category page for SEO reasons and enhanced readability.

So, the question is – how do we define an “alternative” product category name, so that this can be used on the product category page as custom title, while using the default one for other smaller locations such as menus and widgets?

Well, this is how it’s done – enjoy!

Continue reading WooCommerce: Override Product Category Page Title

WooCommerce: How to Split Variable Products Into Simple Products

If you sell simple products with no variations like books or software – the standard WooCommerce product page is enough and an ideal solution for your WooCommerce store. However, it isn’t the best solution for stores that sell variable products with multiple product variations. 

A variable product comes in different variations. A simple example is clothing items, including a shirt – with multiple variation attributes like size, color, and pattern. So, if a shirt is a variable product – a medium-sized shirt, small-sized yellow shirt, or large-sized printed shirt are its product variations.  

Thus, a product variation is the final product choice of the customer once they select multiple attributes belonging to a variable product. 

By default, WooCommerce displays all your variable products as just that – products with multiple different variations on its shop page. However, you might need a way to display each product variation as an individual product on your WooCommerce shop page to improve customer experience, search functionality and increase overall sales. 

So, in this article, we’ll see different ways through which you can split your variable products to show them as a single variation product on your WooCommerce store. But first, let’s see how this process can help your store’s bottom line. 

Continue reading WooCommerce: How to Split Variable Products Into Simple Products

WooCommerce: Why Use A Product Configurator Instead of Variations

One of the biggest marketing trends in recent years is the increasing shift towards delivering customized and personalized product experiences to customers. 

Customers are increasingly looking for online and eCommerce stores that provide order customization options for gifting purposes and the ability to add their personal and unique touch to their orders. While 90% of the U.S. customers find the idea of personalization appealing – impersonal shopping experiences frustrate 71% of customers

Thus, as a WooCommerce store owner – it’s important to strive and meet the increasing consumer demands to prevent dissatisfaction, improve their shopping experiences and increase the overall sales.  

This article will see some easy yet impactful ways to deliver a personalized customer experience and order customization. But first, let’s see how it can benefit your WooCommerce store. 

Continue reading WooCommerce: Why Use A Product Configurator Instead of Variations

WooCommerce: Top Product Filter Plugins For Your Store

As your WooCommerce store grows – so do its product variants. On average, a WooCommerce store owns hundreds of inventory items and product variants for sale. 

While your goal might be to offer maximum product options to your visitors, with such a wide range of product variations – it can get challenging for your customers to find the exact product they’re looking for. 

This is where product filters come into play. Statista suggests that 61% of buyers consider the ease of finding products the most important aspect of an online shopping experience.  

No one has time to browse through the long product listings as it’s easier for customers to switch to another store that facilitates product discovery. Thus, product filter options enable your customers to browse through products of their preferences – positively impacting the user experience and increasing the chances of sales. 

This article shares the top product filter solutions for your WooCommerce store. But first, let’s learn more about their benefits and how this simple option can affect your store’s bottom line. 

Continue reading WooCommerce: Top Product Filter Plugins For Your Store

WooCommerce: User Can Only Purchase A Product Once

In the era of online courses, subscriptions, custom-made products and product personalization, it may happen that you need to limit a specific WooCommerce product sales. For example – users may only purchase a trial product once in their lifetime.

In this short tutorial, we will see how this is done. Clearly, the user must be logged in in order for the code to trigger, so this applies to stores that require checkout login before proceeding with the order.

Enjoy!

Continue reading WooCommerce: User Can Only Purchase A Product Once

WooCommerce: Disable Single Search Result Redirect

You have a WooCommerce product called “VREIUTERTKXYU“. You search for “VREIUTERTKXYU” (exact match). WooCommerce, by default, redirects you to the single product page as there is only 1 possible search result (as opposed to sending you to the search result page).

In today’s tutorial, we will be deactivating this WooCommerce function and go back to the normal (at least, to me) behavior: even if there is an exact match in a search (single search result), we still want to display the search page.

The screenshot that follows gives you a working proof, once the snippet you find below is active. Enjoy!

Continue reading WooCommerce: Disable Single Search Result Redirect

WooCommerce: How to Enhance the Product Gallery

Product featured and gallery images are important components of your online WooCommerce store – because most online shoppers base their product purchase decisions on product images. 

Don’t take our word for it. According to Etsy, 90% of online customers say the product image quality is a decisive factor in an online sale. Thus, it becomes imperative to improve your product images and the visual appearance of your online store to boost clicks, maximize conversions, and increase sales. 

Unfortunately, the standard WooCommerce product gallery provides a basic interface – making it difficult to boost your product images. So, if you want to turn your simple WooCommerce product gallery into a responsive and stunning carousel slider – this article is for you.

We share the top plugins you can use to customize your WooCommerce product gallery and create appealing product images that drive sales. But first, let’s see how improving gallery images can help your online store. 

Continue reading WooCommerce: How to Enhance the Product Gallery

WooCommerce: How to Sell CBD Products

Since the Food and Drug Administration (FDA) removed cannabidiol, also known as CBD, from schedule 1 of the Controlled Substances Act in 2018, there has been a significant increase in CBD eCommerce in the United States. 

Studies suggest that the CBD industry will see a sustained compound growth rate of 55% over the next few years, with the market set to reach a whopping $2.1 billion by 2030.

However, since CBD products are highly-regulated, it’s not easy to sell them online, and you need to adhere to a special set of rules and regulations. 

WooCommerce is an ideal eCommerce platform for CBD sellers. However, even though you can sell CBD products with WooCommerce, Automattic — the parent company of WooCommerce, Jetpack, etc. — only supports the sale of CBD-related products under specific conditions.

You cannot use payment gateways like Stripe or PayPal to accept payments. This means that “WooCommerce Payments” prohibits CBD too.

Therefore, the real challenge lies in finding the right payment provider. Fortunately, there are several third-party payment merchants and even plugins that you can use to sell CBD products with WooCommerce. 

In this article, we’ll talk about seven different payment solutions that permit the sale of CBD-related products with WooCommerce.

Continue reading WooCommerce: How to Sell CBD Products

WooCommerce: Hide Price If Product Out of Stock @ Frontend

Sometimes, the nature of ecommerce businesses requires some extra features. Thankfully, WooCommerce allows to customize pretty much everything based on whatever condition.

Today, we’ll see how to hide prices for out of stock items, on the shop, categories, archives, loops and single product page.

Think of an art gallery which sells unique art pieces, and doesn’t want to let users know for what price sold an item. Or maybe an online business that often runs discounts – why reveal at which price sold an item that is now out of stock? Of course, there are way more case scenarios – I’d be curious if you shared yours in the comment area.

But for now, copy and paste the snippet and that’s it, you’re good to go. Enjoy!

Continue reading WooCommerce: Hide Price If Product Out of Stock @ Frontend

WooCommerce: How to Build a One-Product Website

Crocs started by selling just foam clogs, and now they’re a billion-dollar company. Casper earned millions selling only mattresses, while Sara Blakely became one of the youngest self-made female billionaires with Spanx, which sold only underclothes initially. 

Can you guess what all these brands have in common? It’s that they started off by selling just one product, built their entire brand around it, and yet became successful. 

Today, most eCommerce businesses sell multiple products – because of the presumption that the more products you offer, the higher chances of converting visitors and making a sale. But from managing operations to inventory, a store with many products comes with its own problems.

On the other hand, selling just one product can streamline your store’s operations and make inventory management and handling orders easy. 

It allows you to focus all your energy and resources on creating, marketing and improving a single product. If done correctly, this can help you build a significant brand value – as people will start associating your store with your flagship product, making you an expert in your market and helping you stand out from your competitors. 

Given its benefits, creating a one-product store is an excellent idea – all you practically need is the right product for your customer’s needs and a solid, easy-to-navigate website. 

Lucky for you, this article will help you with the latter, taking you through all the steps of creating a fantastic WooCommerce website for your one-product store

Let’s begin!

Continue reading WooCommerce: How to Build a One-Product Website

WooCommerce: Define Product Settings Programmatically e.g. Enable Reviews, Sold Individually

In WooCommerce, everything is easy until you have a dozen products to manage. But once you start scaling, and maybe need to import hundreds of items, right then is when you go looking for shortcuts.

Problem is – there are single product settings that you must enter manually for each product (or do it in bulk anyway) such as tax status, tax class, shipping class, sold individually, enable reviews and more; you could keep repeating your manual setup operations or fine-tune your bulk editor system to get that done, but what if there were a few lines of code that would simply “set” whatever option you need for ALL products, without worrying whether that specific option is set or not set in the single product edit page?

For example, it happened to a client of mine that we forgot to “enable reviews” on 10,000 imported products so we were left with two choices: re-run the product import, or find something smarter. And the latter is what we’ll cover today.

So, how do you “override” or “force” a specific WooCommerce single product setting without worrying about its actual per-product value, so that products do behave all the same? Here are a couple of ideas. Enjoy!

Continue reading WooCommerce: Define Product Settings Programmatically e.g. Enable Reviews, Sold Individually

WooCommerce: Disable Attribute Select Unless Previous Is Selected (Variable Products)

On the single product page for a variable product, multiple dropdowns display so that users can select their desired attribute choice.

In certain cases, you’d want them to follow the exact top-to-bottom attribute order while they’re selecting a specific variation. With that I mean that you want them to select the first attribute first, then the second, then the third… basically you want to disable the “next attribute select dropdowns” unless the previous select changes to a value that is not null.

Better shown in an image than said, so here’s the GIF, and with that the PHP/jQuery snippet. Enjoy!

Continue reading WooCommerce: Disable Attribute Select Unless Previous Is Selected (Variable Products)