WooCommerce: Add Product To Order After Purchase

On Business Bloomer I sell a bundle of products, and I use no Bundles plugin for that. So the challenge was to programmatically add a list of products to the order upon purchase, once the bundle product is purchased.

This is an amazing way to save time for the customer, as they don’t need to manually add each product to the cart. In the background, after a successful purchase, some magic code (that you find below) adds products to the order, sets their price to $0.00 (so that the order total is not altered), and saves the order. Enjoy!

Continue reading WooCommerce: Add Product To Order After Purchase

WooCommerce: Add a Third Description @ Single Product Page

There are times when the “long description” and the “short description” are not enough on the WooCommerce Single Product page. What if you need to add another HTML content section – say – at the very bottom of the page (and maybe, because of the longer page, add another add to cart button there as well)?

In this simple snippet, we will add another “WYSIWYG” text editor in the Edit Product page, and display the output at the bottom of the single product page. Enjoy!

Continue reading WooCommerce: Add a Third Description @ Single Product Page

WooCommerce: Get 10+ New Widgets With This Elementor Add-on

Already using Elementor to build your one-of-a-kind WooCommerce website?

Great, because you can now take your powered-by-Elementor WooCommerce store to the next level with a new third-party extension.

Think of product tables, grids, and carousels; of product page widgets such as toggles, improved star ratings, sale countdowns, and add to cart plus and minus buttons.

Also, category grid and carousel views. With plenty of layout and styling options, you can create a unique look and feel for your WooCommerce store.

Developed by Consortia, a company with a track record of creating popular plugins for WooCommerce like Bulk Table Editor, Cost & Reports and Bulk Category Editor, the new Consortia Addons plugins is the perfect fit for those who want to step up their Elementor game and take advantage of new features.

Continue reading WooCommerce: Get 10+ New Widgets With This Elementor Add-on

WooCommerce: Hide “View Cart” Button @ Mini-Cart

Your goal as a WooCommerce entrepreneur is… to get paid!

We’ve already seen how to put Cart and Checkout on the same page to save your customers a step and go straight to the purchase page – but no matter if you still have a Cart page or not, you may be interested in hiding the “View Cart” button from the cart widget dropdown, so that customers can go straight to the Checkout page and convert.

Here’s a super quick snippet to achieve just that. Enjoy!

Continue reading WooCommerce: Hide “View Cart” Button @ Mini-Cart

WooCommerce Subscriptions: Display Start-End Dates @ Cart & Checkout

Interestingly enough, when you add a subscription product to the cart, there is no renewal date information unless you scroll to the very bottom and are able to read the very small text below the “recurring total” (see screenshot).

It would be way more helpful if dates (and specifically the WooCommerce subscription start date and end date) showed right under the product name inside the Cart table and in the Checkout page order review, so that the customer knows exactly what they are purchasing before having to figure that out.

So, here’s how it’s done. Enjoy!

Continue reading WooCommerce Subscriptions: Display Start-End Dates @ Cart & Checkout

WooCommerce: How to Add Custom Fields to Variations

When selling products on your WooCommerce store – you want to provide as much product information as possible to your customers. This is especially because, unlike a physical shop or a brick and mortar store – your online customers cannot physically touch or experience the products before buying them. 

Hence, providing additional information and keeping customers informed about the multiple facets of your products is essential. And an effective way to enhance customer experience is by adding custom fields for product variations. 

Product variations are product attributes – including the product’s size, color, pattern, texture, and style. On the other hand, WooCommerce custom fields allow you to add additional data for individual products – to display on a single product page. 

Custom field variations let you add data unique to an individual product – which can include anything from the product’s ISBN, additional product specifications, radio buttons, and checkboxes. Thus, custom fields for product variations could either mean: 

  • Fields to display additional product variation’s information, or 
  • Fields to accept customer input to customize the product variation through dropdowns or radio buttons. 

So, in this article, we share simple yet efficient ways to add custom fields to product variations. But, first – let’s see how adding fields for product variations help your WooCommerce store. 

Continue reading WooCommerce: How to Add Custom Fields to Variations

WooCommerce: Recover $$$ With a Cart Abandonment Plugin

Imagine having a customer who spends ages looking through your online store, adds several products to their cart – only to abandon the order at the last step. Frustrating, right?

Abandoned carts are a significant problem for eCommerce store owners. In fact, research suggests the average cart abandonment rate is nearly 70%. This means that 7 in 10 customers abandon shopping carts, leading to a loss in sales and revenue for businesses. 

But what if there was a way around this? 

Using WooCommerce abandoned cart recovery plugins, you can engage visitors even after they’ve abandoned their carts and left your store to convert them into customers.

In this article, we’ll explore the best plugins for abandoned cart recovery. But first, let’s understand how these plugins work and why you should use them. 

Continue reading WooCommerce: Recover $$$ With a Cart Abandonment Plugin

WooCommerce: Why Enable Sliding Cart?

Cart abandonments are a WooCommerce store owner’s worst nemesis – research suggests a whopping 69.8% of customers abandon shopping carts, causing a massive dip in sales and revenue. The same study also revealed that high and unexpected shipping charges, complicated checkout processes, and inability to see the order total are some major reasons behind cart abandonment. 

But what if there were ways you could overcome these problems and increase conversions? 

Well, we already covered a possible solution here, so we’ll add to that today by looking at floating cart plugins. 

These tools can help your customers view their shopping cart on any page of your WooCommerce store, saving them the back and forth between the page they’re currently on and the WooCommerce cart page. 

Customers can see the items they’ve added to the cart, the order total, shipping costs, and even check out – all without going to another page. This can help smoothen their experience at your store and fasten the buying process, translating into more sales and profits for you.

This article will explore some popular WooCommerce floating cart plugins you can use to leverage this feature on your store. But first, let’s understand how floating carts work and help your online store generate more sales. 

Continue reading WooCommerce: Why Enable Sliding Cart?

WooCommerce: Quick Cart Abandonment Solutions

Automattic-acquired WooCommerce platform is one of the largest eCommerce giants – powering 29% of all online stores. It isn’t even a decade old and is already known to be a market leader – with about 5M+ active installations.                  

What makes WooCommerce so popular amongst eCommerce merchants is its enhanced customization ability – allowing them to tweak their store’s appearance and functionalities per specific business goals. However, eCommerce merchants’ biggest unsolved issue is the increasing cart abandonment rates.

This is where Shopify gets a competitive edge with its ShopPay checkout feature – an effective way to speed up transactions and ensure frictionless checkout for customers to reduce cart abandonment.

Today’s customers expect the checkout process to be quick and easy – which otherwise makes them abandon your website and leave the items in the carts unpurchased. The longer it takes for customers to complete the checkout – the more they’re likely to switch to convenient eCommerce stores like Amazon, which offers one-click checkout. Unfortunately, 97% of customers opt out of making purchases simply because it isn’t convenient. 

We discussed the growing fickle nature of customers in the previous article – but the key takeaway is that while WooCommerce provides a convenient default checkout solution, it doesn’t offer a way that matches Amazon’s and ShopPay’s quick and one-click checkout service. 

So, what’s the solution for WooCommerce merchants, and is there any way to provide an equivalent checkout experience as ShopPay or Amazon? Let’s find out. 

Continue reading WooCommerce: Quick Cart Abandonment Solutions

WooCommerce: Conditionally Force Product Quantity 1 @ Cart

There are times when the WooCommerce product settings alone are not enough. You can already tick the “Sold individually” checkbox in the “Inventory” product data tab in the single product edit page to force quantity 1 for whatever product: “Enable this to only allow one of this item to be bought in a single order“.

Problem is, you may need to set this “programmatically” (via code), based on certain conditions. One reason is that you may not want to edit hundreds of products one by one (or in bulk) – another is that you may want to “override” whatever settings based on certain conditions (for example, you set “Sold Individually”, but if the Cart total is greater than 100 you want to allow quantities greater than 1).

As you can see, in this post we will cover, once again, the magic of “conditional logic“. Enjoy!

Continue reading WooCommerce: Conditionally Force Product Quantity 1 @ Cart

WooCommerce: Show Product Stock @ Cart Page

We’ve already seen how to display stock quantity and status on the Shop Page – today we’ll do something similar, but this time we’ll work on the Cart product table, so that we can visually display stock status and quantity to WooCommerce customers who are about to checkout.

Please note – in order for the snippet to work you must have “stock management” enabled, and also each single product in the cart must have “managing stock” checked and, if on backorder, “allow but notify customer” must be selected, otherwise you will see nothing. Enjoy!

Continue reading WooCommerce: Show Product Stock @ Cart Page

WooCommerce: How to Alter Cart Items Count

We’ve already seen how to exclude hidden products from the WooCommerce Mini-Cart widget counter; today I want to expand on the same concept and try to recalculate / alter such counter based on custom criteria.

For example, some business models require to count the number of distinct items in the Cart, no matter their respective cart quantities. So, if there are 2x “Item 1” and 4x “Item 2”, this altered counter would show 1+1=2 and not 2+4=6. So, let’s see how this is done – enjoy!

Continue reading WooCommerce: How to Alter Cart Items Count

WooCommerce: Show SKU @ Cart, Checkout, Order & Emails

When SKU matters to the end user, displaying it in the Cart page, Checkout page, Thank you page, My Account View Order page and Order Emails under the item name is a must.

Ideal for B2B businesses and international brands, this simple customization can help you learn how to add any sort of content under the Cart/Checkout/Order item names. Simply use the same hook and try “getting” something different than SKU with this guide. Enjoy!

Continue reading WooCommerce: Show SKU @ Cart, Checkout, Order & Emails

WooCommerce: Get Cart Data (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 Data (total, items, etc) from $cart Object

WooCommerce: Sync Product Quantities @ Cart

This snippet will help you synchronize all your cart items’ quantities with a given product ID quantity. When you add a second product to cart, therefore, it will get the same quantity of your product ID. Also, if you update the quantity of product ID, the other cart item quantities will automatically update accordingly.

Applications are quite niche, but it’s great to learn how to programmatically set the quantity of a cart item. As usual, each snippet of this website has got something that sooner or later you may need to use. Enjoy!

Continue reading WooCommerce: Sync Product Quantities @ Cart

WooCommerce: “Split” Cart Table With A>Z Headings

Because “split” might not be the correct term, let me explain this better.

Let’s imagine your WooCommerce cart table is sorted by A>Z (with my WooCommerce cart sorting snippet for example). If your business model and/or UX requires it, then you might need to add “a cart table heading” for each letter:

  • A
    • Item 1 Title: “AAA”
    • Item 2 Title: “ACC”
  • B
    • Item 3 Title: “BDD”
    • Item 4 Title: “BEE”

Once again, this might sound incomprehensible so you’d better look at the screenshot below. Enjoy!

Continue reading WooCommerce: “Split” Cart Table With A>Z Headings

WooCommerce: Why & How to Disable Ajax Cart Fragments

If you’re here it’s because your WooCommerce website is slow and you’re wondering why the “/?wc-ajax=get_refreshed_fragments” URL generates delays and server loads (spikes).

Besides, there is too much online literature about WooCommerce Ajax Cart Fragments (including specific plugins and performance plugin options), and you want to learn quickly what they are before understanding if and how you should disable them.

Performance optimization tools like Pingdom and GTMetrix often put the blame on this little WooCommerce functionality. And disabling it carefully can give you a boost in speed, page load and ultimately sales conversion rate.

So here’s all you need to know.

Continue reading WooCommerce: Why & How to Disable Ajax Cart Fragments

WooCommerce: Remove Product From Cart Programmatically

We already saw how to add a product to cart automatically, for example if you visit a specific page or if there are no products in the cart – but today we want to find out how to do the opposite: if a certain condition is met, we want to remove a product ID from the cart.

This becomes a little complex – while adding an item to cart requires just its product ID, removing it from the cart forces you to know the “cart item key”. Japanese, I know, but just copy the snippet and you’re done!

Continue reading WooCommerce: Remove Product From Cart Programmatically