WooCommerce: Get Total Spent By Customer

Enabling WooCommerce functionalities only if a “user spent more than X” is not unusual. For example, you may want to display banners, special offers, discounted prices, conditional content to customers who have purchased more than a given dollar threshold.

While coding a function that could get the total spent by a user ID, I stumbled upon a WooCommerce function that already achieves that, out of the box: wc_get_customer_total_spent( $user_id ).

You can use it as a conditional tag and run a function only when such threshold is reached. So, let’s see how to use it. Enjoy!

Continue reading WooCommerce: Get Total Spent By Customer

WooCommerce: Products With Equal Height @ Shop Page

You know, that’s one of the biggest WooCommerce display issues. Products have images of different proportions, different title lengths, some have review stars and some don’t, making the “product grid” layout a big mess in regard to height. You’d be very familiar with the below screenshot I guess.

So, here are a few options you have to make the display consistent. Enjoy!

Continue reading WooCommerce: Products With Equal Height @ Shop Page

WooCommerce: Edit Product Layout If Logged In

Logged in customers often require different UX, communication and website layout. You can hide add to cart buttons for logged out users, yes, but you can also completely remodel the single product page layout. For example, you can remove the featured image, the add to cart button (because maybe you only want them to purchase one product), the sale badge, the price, product tabs, and so on – while also adding logged-in only information such as custom buttons, banners and media.

In this tutorial we’ll see how to target logged in customers who purchased the current product, how to remove some default layout elements and how to add some custom HTML and CSS to the single product page. Enjoy!

Continue reading WooCommerce: Edit Product Layout If Logged In

WooCommerce: How to Create Custom Logs

Logs or log files are a must for WooCommerce developers and store managers. Log files are basically an automatically generated collection of events that happen on a given store, based on certain logging criteria. For example, WooCommerce already creates a “fatal error” log for you, that you can easily access and read within the WordPress dashboard (WooCommerce > Status > Logs).

If you’re familiar with WordPress troubleshooting, you will know how important the debug.log file is while trying to identify website weaknesses, PHP errors or white screen of death. Well, today I’m going to teach you how to create your own log, so that you can record whatever event happens on your WooCommerce website and easily check the logs for troubleshooting purposes.

Specifically, I’ll show you how to create a log every time there is a customer failed order and every time there is a product price change made by the admin. Easy peasy – enjoy!

Continue reading WooCommerce: How to Create Custom Logs

WooCommerce: 5 Plugins That Will Increase Your Conversions

Conversion rate is one of the most important metrics to look out for when running an online store. 

Once you have your store all set up and start attracting traffic to your site through SEO and paid advertising, it’s now time to look at how many of your store’s visitors are converting. 

Let’s step back for a moment and take a look at what a conversion is, anyway? Conversion happens when a prospect does what you want them to do. 

If the purpose of a page is to get the email address of the visitor, you’ll have a successful conversion when a visitor lands on your page and drops their email address. 

In terms of eCommerce, conversions usually refer to the event when a visitor buys your products and completes the checkout process. Or simply put, it means a big, fat sale.

If you thought attracting people to your site was enough to persuade them to buy your products, well, you’re seriously mistaken. It turns out that the average conversion rate in eCommerce is only 1-2%. So, even if you’re doing everything right, you’ll be closing the deal only 2% of the time. 

That means every little bit matters. 

In this difficult territory of getting people to convert, comes a list of growth-hacking and optimization plugins for WooCommerce that will put your store’s conversions on fire. 

Continue reading WooCommerce: 5 Plugins That Will Increase Your Conversions

WooCommerce B2B: How to Set Up a Wholesale Store

The ecommerce sector is seeing incredible growth, year after year, with no foreseeable end in sight. The same is true for B2B ecommerce, yet there aren’t many good platform choices available for small-to-medium businesses that want to sell wholesale. There are several SaaS solutions on the market, but these are costly, closed-source, and mostly oriented towards larger businesses.

If you are a business owner or developer, WooCommerce is a solution that’s free, versatile and powerful. 

Continue reading WooCommerce B2B: How to Set Up a Wholesale Store

WooCommerce: Calculate Subtotal On Quantity Increment @ Single Product

From a UX point of view, ecommerce customers may enjoy a little improvement on the WooCommerce single product page. As soon as they increase the add to cart quantity, it’d be nice if product price could be recalculated or maybe if a “TOTAL” line could appear so that users always know how much they are about to add to cart.

Honestly, this is hard to explain it this way, so the best is if you look at the screenshot. Enjoy!

Continue reading WooCommerce: Calculate Subtotal On Quantity Increment @ Single Product

WooCommerce: Get Cart Info (total, items, etc) from $cart Object

As a WooCommerce development freelancer, every day I repeat many coding operations that I keep forgetting over and over again!

This means I have to search through the WooCommerce plugin files again and again and waste a lot of precious time.

We’ve already seen how to get $product and $order information from their respective objects , so this time we’ll take a look at the Cart page and answer to: “How to get ____ if I have the $cart variable/object available?“.

For example, “How can I get the cart total“? Or “How can I get the cart items“? Or maybe the cart fees, the applied coupons, the cart contents total, the total weight and so on…

Hopefully this article will help you save time as well! Your feedback via Twitter and the blog comments section is much appreciated. Enjoy!

Continue reading WooCommerce: Get Cart Info (total, items, etc) from $cart Object

WooCommerce: How to Safely Update Via Staging

When a new version of the WooCommerce plugin is released, and the WordPress dashboard starts sending you notifications that it’s time to update, this question comes always to mind: “Should I update WooCommerce right now, wait a little longer, or stay on the same version unless something breaks?

Well, updating WooCommerce is ALWAYS a big risk – potentially you can break your live website and miss out on traffic and sales. This can happen every time a significant update is released – many store owners don’t update their stores because they feel the hassle is not worth the effort.

But updating WooCommerce is definitely a good idea for the long-term. The main cause of WordPress hacking is because of out-of-date plugins and themes. And this is where staging environments come in.

A staging website is a clone of your existing live store. It’s completely separate and it doesn’t affect your live store in any way. Staging is also called “testing environment” or “sandbox”, while your live site is usually called “production environment”.

Staging gives you the benefit of 1-click-cloning in a few minutes, updating and testing WooCommerce without worrying about breaking your actual live website, and finally “pushing” the changes to the live website (a.k.a. overwriting the live environment), so the functioning is 100% guaranteed.

Continue reading WooCommerce: How to Safely Update Via Staging

WooCommerce: How Store Credits Can Benefit Store Owners and Customers

Running an online store often means coming up with smart ideas that can help you sell your products faster. Some of those ideas might succeed and some may fail.

There are no strategies that work all the time, for all WooCommerce websites. But there is one that is often very effective: offering store credits. The reason for its popularity can be attributed to the awesome flexibility it provides to both store owners and customers. 

So, let’s find out more about store credits through this article and how you can enable them in your WooCommerce online store. But first – what are store credits?

Well, with this functionality, customers can purchase store credits (as opposed to buying products) and then they can use their credits to buy products from the store. Buyers can either use it for themselves or gift it to others. It’s an easy and effective way to convert your store visitors into buyers. 

Now it’s time to figure it all out. And thankfully, there’s a plugin for that.

Continue reading WooCommerce: How Store Credits Can Benefit Store Owners and Customers

WooCommerce: How to Build a Successful Wholesale Store

The default WooCommerce shop page layout makes it difficult for wholesale buyers to purchase in bulk.

This is because wholesale stores have different requirements as compared to retail stores. For instance, wholesale products are best displayed in a one-page order form for quick wholesale ordering as opposed to a more visual, image-rich layout.

In this post, we’ll run the rule over some of the best tools available for building a great WooCommerce wholesale store.

Along the way, we’ll share some tips on how each WooCommerce wholesale plugin can help you achieve a specific goal and deliver a better user experience.

Continue reading WooCommerce: How to Build a Successful Wholesale Store

WooCommerce: Full Width Featured Image @ Single Product Page

The standard layout for the WooCommerce single product page features the main/featured product image on the left and the title/add to cart on the right. But what if you need to turn that image into a hero one i.e. a full width featured image, and push the title and add to cart button under it?

Well, for once, we’ll take a look at a CSS-only snippet. Sometimes the easiest things are also the ones that work brilliantly. Enjoy!

Continue reading WooCommerce: Full Width Featured Image @ Single Product Page

WooCommerce: Set Min Purchase Amount for Specific Product

We already studied how to set min/max WooCommerce add to cart quantity programmatically. That was an easy one. This time, I want to expand on the topic, and define a “minimum order amount on a per-product basis”.

Which, translated in plain English, would be something along the lines of “set the minimum purchase amount for product XYZ to $50”. And once we do that, I expect that the add to cart quantity does non start from 1 – instead it defaults to “$50 divided by product price”. If product price is $10, I would want to set the minimum add to cart quantity to “5” on the single product and cart pages.

Makes sense? Great – here’s how it’s done.

Continue reading WooCommerce: Set Min Purchase Amount for Specific Product

WooCommerce: How to Customize your Store Without Coding

WooCommerce, with 25% market share for website eCommerce solutions as of November 2019, is the most popular platform for building online stores. It’s easy to get a basic setup running and start selling your products online.

WooCommerce also offers a lot of hooks and filters for further customization – the only problem is you need to understand a bit of PHP programming.

This is where the WooCustomizer WordPress plugin comes in. WooCustomizer offers all of these filters and more, all neatly built into one WordPress plugin so you can visually customize your WooCommerce store in an ‘easy to use’ and intuitive interface within the WordPress Customizer.

No more creating a child theme to manually add code snippets to your WordPress website, no more adding multiple plugins and increasing the chance of bugs coming up… Just a simple, one plugin solution.

Continue reading WooCommerce: How to Customize your Store Without Coding

WooCommerce: 6 Tax & Accounting Tips to Save You Time This Tax Season

If just the thought of tax season gives you a headache, you’re not alone. In fact, 60 percent of small-business owners don’t feel confident about their accounting knowledge (Small Business Report – Accounting).

We understand the feeling – tax season is approaching and you’re frantically trying to add up and categorize all of those shoe boxes full of receipts. Or maybe you’re not even completely sure of your business’ financial position as you haven’t accurately tracked your orders/sales.

Whether you’re behind on your accounting, unsure of what your business income is, or simply want to save yourself the time and headaches that tax season entails, this guide is for you.

We have compiled our top WooCommerce accounting tips to save you time this tax season (and every year there after…)

Ready to dive in?

Continue reading WooCommerce: 6 Tax & Accounting Tips to Save You Time This Tax Season

WooCommerce: Disable Out of Stock Variations @ Variable Product Dropdown

A nice way to avoid user frustration is to never let them pick a product / variation that is out of stock, only to realize later they can’t purchase it.

A variable product comes with a “select dropdown” on the single product page, from which customers can pick their favorite variation. Problem is that ONLY after selecting this they will find out about price, stock status and may be able to add to cart.

Today, we’ll completely disable (grey-out) those select dropdown options (variations) that are out of stock, so that users don’t waste time and only pick one of those that are in stock. Enjoy!

Continue reading WooCommerce: Disable Out of Stock Variations @ Variable Product Dropdown

WooCommerce: How to Add Extra Product Options (Add-Ons)

This is a guest post by Maarten Belmans of Studio Wombat – if you like the article, make sure to thank him in the comments!

If you use WooCommerce for your online business, you may have needed the ability to add extra options.

That functionality allows buyers to personalize their products exactly the way they want – whether they want to add their favorite pizza topping or buy a laptop with extra RAM.

When you provide those options, you optimize the customer experience on your website. But in order to provide those customization options, you’ll need a product add-on plugin.

That type of plugin makes it easy for you to create additional form fields, which in turn allows your visitors to customize the products they want to purchase.

Continue reading WooCommerce: How to Add Extra Product Options (Add-Ons)

WooCommerce: Add Product Table Columns @ Admin

The default WooCommerce Dashboard Products page (/wp-admin/edit.php?post_type=product page) shows the list of products in a table. Default fields are: Image, SKU, Stock, Price, Categories, Tags, Featured and Date.

Sometimes, these columns are not enough and you need more. For example, you might want to quickly take a look at a product custom field, such as “visibility” (whether the product is hidden or not).

So, here’s the snippet for that. Of course, you can adapt it to show your own custom field, an ACF field or whatever product-related information you require.

Continue reading WooCommerce: Add Product Table Columns @ Admin

WooCommerce: WooCart Managed Hosting

In this blog post, I’ll review some of the more important features of WooCart. WooCart is a new hosting provider that fully specializes for WooCommerce. Compared to WP Engine, Flywheel, or SiteGround, WooCart doesn’t offer WordPress hosting at all. It’s a focused package for WooCommerce store owners.

Core difference between managed WooCommerce hosting and other hosting is convenience. In managed hosting everything is bundled up together. You don’t have to worry about any technical issues.

In non-managed hosting you have to manage cPanel, install WordPress, install WooCommerce then check the resource usage and if there is any issue you have to contact customer support, which is most of the time occupied with lots of things, have a scattered focus, and no specialized knowledge. 

Whereas in WooCommerce managed hosting, the team’s focus is only on WooCommerce. That gives you an idea of why they can offer better service. WooCart allows you to spend your valuable time on marketing your store and not fixing technical issues. 

Continue reading WooCommerce: WooCart Managed Hosting