WooCommerce: Remove Shipping Labels @ Cart (e.g. “Flat Rate”)

WooCommerce functions add the shipping method label on the Cart totals, on the left hand side of the price. This ruins the price amounts alignment (subtotal, shipping, taxes, total) and many clients have asked me to remove it completely. Also, it could be that sometimes you don’t want to show the name of a shipping rate on the front-end. So, here’s how you do it!

Continue reading WooCommerce: Remove Shipping Labels @ Cart (e.g. “Flat Rate”)

WooCommerce: Add Prefix / Suffix to Product Prices

Sometimes you may want to add a prefix or a suffix to your prices. It could be something like “From…”, “Only…”, “…tax free” and so on.

The first good news is this is very easy to do with a WooCommerce filter (remember, filters change the value of an existing variable, while actions add content). The second good news is that you don’t need to know PHP, just copy/paste my snippet!

Continue reading WooCommerce: Add Prefix / Suffix to Product Prices

WooCommerce: How to Fix the “Cart is Empty” Issue

For some reason, sometimes you add products to cart but the cart page stays empty (even if you can clearly see the cart widget has products in it for example).

But don’t worry – it may just be a simple cache issue (and if you don’t know what cache is that’s no problem either) or a theme / plugin “conflict”.

The WooCommerce Cart page is extremely delicate; it displays dynamic content based on cookies and PHP sessions, is coded with PHP but also JS and Ajax, requires to be excluded from cache and is subject to problems in case of out of date software.

So, here’s your “Empty Cart” troubleshooting checklist you can follow without any technical knowledge.

I also recommend you read through the (many) comments, because many developers shared what worked for them too. Good luck!

Continue reading WooCommerce: How to Fix the “Cart is Empty” Issue

WooCommerce: How to Shorten Product Titles

A very common WooCommerce shop page issue: sometimes (and especially with affiliate stores), WooCommerce product titles are way too long and go over several lines, messing with the overall vertical alignment.

On top of this, you may also want to keep the shop experience consistent, and make all the WooCommerce product titles of the same length. This is how you do it. Enjoy!

Continue reading WooCommerce: How to Shorten Product Titles

WooCommerce: “You Only Need $$$ to Get Free Shipping!” @ Cart

This is a very cool snippet that many of you should use to increase your average order value. Ecommerce customers who are near the “free shipping” threshold will try to add more products to the cart in order to qualify for free shipping. It’s pure psychology.

Here’s how we show a simple message on the WooCommerce Cart page. Enjoy!

Continue reading WooCommerce: “You Only Need $$$ to Get Free Shipping!” @ Cart

WooCommerce: Fix the “uploaded file exceeds the upload_max_filesize directive in php.ini” error

When importing a big export file from another site, or when installing dummy data from your template developer, the error “the uploaded file exceeds the upload_max_filesize directive in php.ini” is likely to show. Here’s what you can do to fix it. Continue reading WooCommerce: Fix the “uploaded file exceeds the upload_max_filesize directive in php.ini” error

WooCommerce: Add Payment Method to Order Emails

If you wish to print the payment gateway name on order emails (in its own paragraph below the order items table), here’s a handy snippet for you.

All you need to use is the “woocommerce_email_after_order_table” hook to pick the correct position, and then the “get_payment_method_title” WooCommerce function to return the payment gateway name. Enjoy!

Continue reading WooCommerce: Add Payment Method to Order Emails

WooCommerce: Hide Prices on the Shop & Category Pages

Interesting WooCommerce customization here. A client of mine asked me to hide/remove prices from the shop page and category pages as she wanted to drive more customers to the single product pages (i.e. increasing the click-through rate).

As usual, a simple PHP snippet does the trick. I never recommend to use CSS to “hide” prices, as they would still be visible in the code – PHP stops the prices from loading, so they’re invisible to the user.

Continue reading WooCommerce: Hide Prices on the Shop & Category Pages

WooCommerce: How to Remove the “Default Sorting” Dropdown

If the WooCommerce product sorting functionality (“Default Sorting” dropdown) is a waste of space or you don’t need that select box at all, you may want to remove it.

This PHP solution is simply cleaner than CSS – and no matter if you code or not, you just need to copy/paste my snippet in your theme’s functions.php.

Continue reading WooCommerce: How to Remove the “Default Sorting” Dropdown

WooCommerce: How to Export/Import Products

Maybe you don’t know that, but WooCommerce has an inbuilt functionality for importing and exporting products from CSV/XML files. Therefore, most of the times, you don’t need a premium import/export plugin.

Simply go to WordPress Dashboard > Products > All Products and click on Import (or Export) and follow the instructions. That’s it!

This is a new functionality introduced since WooCommerce 3.0 and it’s working like a charm.

For more advanced import/export, automatic updates from server and more complex functionalities, take a look at WP All Import + WooCommerce Add-On

WooCommerce: Add Content to a Specific Order Email

Customizing WooCommerce emails via the WordPress dashboard is not easy and – sometimes – not possible. For example, you can’t edit or add content to them unless you’re familiar with code.

Well, here’s a quick example to learn how to add content to any WooCommerce default order email. In this case study, our goal is showing an upsell to get buyers to go back to the website and buy with a coupon code. Enjoy!

Continue reading WooCommerce: Add Content to a Specific Order Email

WooCommerce: Hide “Showing x-y of z results” @ Shop Page

This is quite an annoying thing in WooCommerce when you have just a few products.

Besides, if you only have 1 product in a given category, the notice “Showing the Single Result” will appear on top of the category page.

So, how do we remove the whole “Showing 1–15 of 178 results” element from the Shop, Category, Tag and product loop? Here’s the fix. enjoy!

Continue reading WooCommerce: Hide “Showing x-y of z results” @ Shop Page