WooCommerce: Create Product Programmatically

No matter if this snippet suits your needs or not, it’s still interesting to see how you can create a brand new WooCommerce product programmatically / automatically when a certain even triggers.

In this case studio, we’ll see how to generate a brand new product, set its featured image, price, category, title and a download file as soon as an image is uploaded in the WordPress backend Media section. This would be super useful for photographers for example – simply upload a new image to the WordPress Media Library, and a new product is automatically created.

Of course, you can customize the code and use it with different triggers. For example, you may need to create a new product automatically when each phone product needs always a matching case product, just with a different title. Or maybe you want to tie product creation once an order is placed.

Either way, enjoy!

Continue reading WooCommerce: Create Product Programmatically

WooCommerce: Top Variation Swatches Plugins

Variation swatches are kind of a no-brainer. While this type of plugin is not typically classified as essential, I would argue that it is if you’re trying to build a world-class online store.

I am assuming, of course, that you don’t want to go through the work that these developers have gone through smoothing out the folds and wrinkles that inevitably arise when building even the most innocuous extension to WooCommerce.

The fact of the matter is that colors and images are a lot more compelling than text on a screen, so – whether it’s your own store or a client’s – why pass up the chance to increase the likelihood of a conversion? 

All of these plugins let you get started briskly, easily, and freely; are available in premium and free versions; and, trust me when I say, there is a good reason for each and every one of them to appear on this list, whether it’s because of the feature base, price, or aesthetic preferences. 

So without further ado, drum roll please…

Continue reading WooCommerce: Top Variation Swatches Plugins

WooCommerce: Sort Products By Stock @ Admin Dashboard

We’ve already seen how to sort frontend products by in stock first and out of stock last, but what about doing the exact same for administrators and shop managers in the backend?

Sometimes shops have to deal with a lot of “sold” products and the products table becomes messy, so this is a way to sort by stock status (In stock -> Out of stock) on load. You can then use the column headers to sort by other data as usual, so this will only work once you access /wp-admin/edit.php?post_type=product page.

So, here’s a very simple snippet for you. Enjoy!

Continue reading WooCommerce: Sort Products By Stock @ Admin Dashboard

WooCommerce: The Rise of the Biggest eCommerce Platform

Paul Maiorana, CEO at WooCommerce, began his post about the platform’s ten year anniversary by sharing the first line of WooCommerce code ever written:

add_action( 'wp', 'woocommerce_init', 0 );

I found it highly fitting – the first line of a pastiche poem that continues to be written to this day. Like any pastiche, WooCommerce, by virtue of its open-source philosophy, draws from a wide variety of sources and, like any inchoate piece of art, it is a long way from perfect.

But, despite that, or perhaps because of it, WooCommerce has a lot to be proud of. Its shining asset is a highly prolific, tight-knit yet widely dispersed developer community, which now presides over the largest population of online merchants ever assembled by a single content management system.

More merchants call WooCommerce home than any other platform, and that simply would not be possible without its developers. I know I’m starting to sound like Steve Ballmer, but it’s true. 

But how did WooCommerce get to this point? Like Maiorana, I think some reflection is in order. 

Continue reading WooCommerce: The Rise of the Biggest eCommerce Platform

WooCommerce: Membership Plugins Compared

A bird in the hand is worth two in the bush” applies well to business. While customer acquisition is important, what’s even better is to drive repeat sales and increase your business by retaining your existing customers. 

An excellent way to do this is by offering memberships on your online store. By making customers a part of an exclusive club or giving them privileged access to content and offers, you can make them feel valued and enhance their loyalty towards your brand. 

Take it from the 76% of businesses that claim a subscription-based model helps them retain customers and create long-term relationships with them. 

And this is not it – by limiting access to premium content, you can also compel non-members to convert and purchase from you. 

Now, the thought of creating and managing memberships on your online store can seem scary, but WooCommerce membership plugins can make the job simple for you. With their ease of use, features, integrations, pricing, and support, these plugins are some of the most sought-after when it comes to memberships. 

This article will explore 6 WooCommerce plugins you can use to start a membership program in your store from scratch. But first, let’s take a look at the benefits of a membership website. 

Continue reading WooCommerce: Membership Plugins Compared

WooCommerce: Choosing the Right Bookings Plugin

If you sell rental products or your business revolves around bookings and reservations, you know that managing appointments manually is not a cakewalk. 

Getting on calls with clients, finding mutually available meeting slots, sending reminders, and avoiding double bookings – all of it can get taxing.

Moreover, it’s inconvenient for customers as well – in a survey, 59% of respondents expressed frustration with scheduling appointments over the phone. And 70% of them said they’d prefer booking online. 

These statistics tell us how important online booking is to run a hassle-free business and make it butter-smooth for the customers too. And one of the easiest ways you can start taking and managing bookings on your website is by using appointment booking plugins

There are a wide variety of plugins available. But WooCommerce booking plugins remain a top choice for many eCommerce businesses – given their easy setup, valuable integrations, and customization features. 

This article will explore eight such WooCommerce plugins that can help you automate and streamline your scheduling process. 

Let’s dive in!

Continue reading WooCommerce: Choosing the Right Bookings Plugin

WooCommerce: Top Multi-Currency Plugins

Look around you.

The world we live in is a thoroughly globalized and interconnected one. Limiting factors such as space and time have been compressed by intercontinental supply chains and information technology. In short, we have inherited a smaller world. So I implore you, merchants of WooCommerce, to take your inheritance in hand and make the world your oyster. Begin selling your goods and services to an international audience as swiftly as you can. 

One of the first things you will require is a multi-currency plugin because, despite the fact that WooCommerce lets you choose between 100+ currencies, you can only enable one base currency at a time. To sell to an international audience successfully, you will need to do better than this. You will need to display the appropriate currency based on who is looking at your products or where they are looking at your products from. Multi-currency plugins, some of which are referred to as currency switchers, let you do that. 

So without further ado, let’s take a look at our top picks for multi-currency plugins. 

Continue reading WooCommerce: Top Multi-Currency Plugins

WordPress: Growing Your Plugin (Part 2: Integrations)

If you use the word “integration” or “compatibility” with a seasoned plugin developer, chances are you might make them flinch. You can’t blame them. More often than not, these terms bring to mind an inbox laden with emails asking for compatibility with one plugin or another, day in and day out. 

But what’s the big deal?- you ask. You, the proud developer of a newly released plugin, would kill to have an inbox full of customers. You would gladly trade places. 

Well, the fact of the matter is that the prospect of an integration can be daunting. It means a plugin developer may have to become familiarized with a codebase that falls far short of their own standards (we all know what open-source, at its worst, can lead to). After that, resolving the compatibility issue in question ranges from cakewalk to descent into the underworld. Usually, it’s somewhere in between. The last step, of course, is to get back to the customer in question. Imagine the battle-tested plugin developer’s remorse when, on occasion, they never hear so much as a peep from that customer again. Sure, the resolution to this issue may pay dividends in the long-run, but as the veteran developer knows full-well, there is no guarantee of that. 

In a word, ensuring your plugin plays well with others is no joke. That’s why you don’t hear many old-timers advising folks to make integrations and compatibility a focus, or at least that’s my hypothesis. But regardless of whether my suspicion is true or not, the fact that this is a neglected growth lever is beyond dispute. You don’t need to take my word for it either. Just ask Chris Lema, who recently stated as much in one of his blogposts (which I briefly covered in WooWeekly).

The message is simple: it pays well to ensure your plugin plays well with others. Even if that sounds like bad poetry to you, it’s true. 

Continue reading WordPress: Growing Your Plugin (Part 2: Integrations)

WooCommerce: Product Category Price Range

WooCommerce variable products display a price range by default, which goes something like this: $MIN-$MAX. Now, wouldn’t it be nice, on the Shop page or Category Widget, to show the price range for each category?

Well, as usual this is a customization that can apply to certain online businesses only, so hopefully you’re one of them. Either way, this is yet another chance for you to learn PHP applied to WooCommerce. Enjoy!

Continue reading WooCommerce: Product Category Price Range

WooCommerce: Top 8 Points and Rewards Plugins

While acquiring new customers is essential for every business, nothing can beat customer retention

Knowing your brand and having tried your products and services, existing customers are much more likely to buy from you after a positive experience.

One way to create a memorable experience for customers and nurture and retain them is to start a points and rewards system. This will not only help increase customer’s interest in your store, but the chances of winning points and exciting rewards will give them another reason to shop from you more often. 

In fact, in a survey, 58.7% of internet users said earning rewards and points was the most valuable aspect of their shopping experience. 

However, managing a rewards system manually and keeping a tab on the points can be pretty taxing – but this is precisely where WooCommerce points and rewards plugins come in handy. 

With their vast features and top-notch support, these plugins can help you create a loyalty program for your online store within a few clicks. Once it’s up and running, you can easily track the success of your program and manage customer points from one single dashboard. 

When it comes to points and rewards plugins, you can be spoilt for choice. But to make things simple for you, we’ve done the legwork and compiled a list of the best WooCommerce points and rewards plugins that can help you increase sales and customer engagement. 

Let’s explore them!

Continue reading WooCommerce: Top 8 Points and Rewards Plugins

WordPress: Growing Your Plugin (Part 1: Website + SEO)

If you build it, they may come – but not in as great a number as they would otherwise. 

I have seen WordPress developers reach as many as 10,000 active installations without spending a single minute on dime marketing. However, on every occasion that I hear such a story, I pause to wonder: how big would this theme or plugin be if the developer behind it thought about distribution?

Maybe their product spawns a company and they become the next YITH or Yoast, toasting after a major acquisition not thought possible in their wildest dreams

The first hurdle to overcome as a developer is the fallacy that your product is tainted by even the slightest speck of marketing, as if it was a glass of unadulterated, pure spring water sourced from the streams of Mount Olympus.

The WordPress ecosystem is not the plains of Dion – it’s more like the dregs of Romulus. More and more, it is guaranteed that you will face competition from the optimates, the big guys who come in the form of hosting providers, prolific WordPress development companies, super plugins, site builders, etc. 

The best themes and plugins don’t always win in the face of superior brands and warchests. In fact, the more disillusioned among us would say that they rarely do these days.

The good news is that the best themes and plugins can win, even if their developers are unknown and resource-constrained. But it all begins by bringing the horse to water. After that, if the product is good enough, the horse will drink. If it does not drink, there is more development to do. 

Continue reading WordPress: Growing Your Plugin (Part 1: Website + SEO)

WooCommerce: How To Change The Permalink Structure

WooCommerce permalink structure may appear unusual for newcomers. Those /product/ and /product-category/ parts of the URL are well-known distinctive features, but some experts don’t agree that this is the most convenient way to handle permalinks SEO-wise. 

A popular thought is to always keep URL structure as simple as possible and remove any unnecessary parts of it. You don’t have to take the word of those experts or me since the official guideline from Google suggest to avoid lengthy URLs with unnecessary parameters. 

So, what does that exactly mean for WooCommerce store builders? 

First of all, URL bases like /shop/, /product-category/ and /product/ can be considered unnecessary as Google knows how to define shop and product pages without the need of specifying that inside the URL. 

And probably you don’t want to create a false perception of site depth for crawlers so they don’t rate those pages lower than they should be. Again, a well-known precept – pages closer to the main folder (domain) are more meaningful for search engines. 

If you agree with such statements, it would be helpful to understand how to redesign the permalink structure in WooCommerce. So read ahead to find out about that. 

Continue reading WooCommerce: How To Change The Permalink Structure

WordPressopoly: WordPress Acquisitions Are Not a Game Anymore

wordpressopoly

Is there a Monopoly version of WordPress yet?” – Cory Miller.

There is now, Cory, at least in png form. 

The WordPress ecosystem, and the unwalled WooCommerce garden contained within it, is experiencing a wave of consolidation, so much so that a webpage dedicated to tracking acquisitions now exists. 

Yesterday, LiquidWeb/StellarWP acqui-hired LearnDash LMS.

A few days ago, WooCommerce acqui-hired SomewhereWarm, the team behind some of the most popular WooCommerce marketplace plugins.

On September 8, 2021, Jetpack acquired Social Image Generator, which is a WordPress plugin that does what it says on the tin.

On August 30, 2021, Automattic acqui-hired Frontity, to further develop Gutenberg and full site editing.

The list of acquisitions is never-ending. And this wave won’t stop.

So, what’s really happening, and why?

Continue reading WordPressopoly: WordPress Acquisitions Are Not a Game Anymore

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)

WooCommerce: Exploring the Codebase

WooCommerce codebase

WooCommerce is a plugin with a large and complicated codebase.

If you’re a developer, understanding the underlying code in detail is hugely beneficial, and will almost certainly pay dividends in the long term.

If you can write a bit of PHP (most of Business Bloomer is made of PHP Snippets), you definitely need to search the core every now and then. Otherwise, Stackoverflow won’t be sufficient on its own.

If you happened to see and use the WooCommerce Visual Hook Guides such as the one for the Single Product Page, well, those are simply generated (manually…) from the code itself by executing many PHP searches. I personally keep a copy of the latest plugin files in my PC downloads, so that I can always search through it when looking for a hook or a specific function.

So, follow along with me in this article as we explore the WooCommerce codebase, how it’s structured, and some of its inner secrets!

Continue reading WooCommerce: Exploring the Codebase