WooCommerce Visual Hook Guide: Cart Page (Block Version)

I’ve put together a visual hook guide for the WooCommerce Cart Block (you can find the legacy shortcode version here).

Please note – as of the date above, you can’t really customize the Cart Block via PHP (unless you use the workaround below).

If you need to personalize the Cart page, move elements around, hide default elements, add custom content, you can play on the Edit Page and do the usual manual work with blocks: you can move them (e.g. you can move the coupon form to the bottom), remove them (e.g. you can remove the cross-sells block), place blocks in between default blocks (e.g. you can add some text above and below the “Place Order” button), etc.

But if you wish to do that via code (custom plugin, snippet, child theme), then you must revert to the shortcode version – unless, once again, you get to understand my workaround as per the below visual hook guide.

So, at least for now and until WooCommerce decides to release actions and filters for us developers, let’s see how to find WooCommerce Cart Block hooks quickly and easily by seeing their actual location.

Once you’ve picked your hook, all you need to do in your custom code is “add_action(‘hook_name’,’custom_function’);” and you can place your personalized content in that exact position within the WooCommerce Cart Block.

Enjoy!

Continue reading WooCommerce Visual Hook Guide: Cart Page (Block Version)

Shoptimizer Theme Visual Hook Guide

Here’s a visual hook guide for Shoptimizer Theme by CommerceGurus, a WooCommerce theme specifically developed with speed, performance, sales conversion and UX in mind.

This visual guide belongs to my “Visual Hook Guide Series“, that I’ve put together so that you can find WooCommerce hooks quickly and easily by seeing their actual locations. Also, you can copy & paste in seconds and speed up your customization time.

Let me know in the comments what you think about this resource! Enjoy!

Continue reading Shoptimizer Theme Visual Hook Guide

WooCommerce Visual Hook Guide: Archive / Shop / Cat Pages

I’ve created a visual HTML hook guide for the WooCommerce Archive Page (which is the same page for the Shop, Category, Tag pages). This visual guide belongs to my “Visual Hook Guide Series“, that I’ve put together so that you can find WooCommerce hooks quickly and easily by seeing their actual locations (and you can also copy/paste). If you like this guide and it is helpful to you, let me know in the comments!

Thanks to this WooCommerce Archive Visual Hooks Guide, you can now go to your template’s functions.php file and use “add_action(‘place-hook-here’,’your-PHP-function-here’);” – you can then place your custom functions exactly where you like them to be. Enjoy!

Continue reading WooCommerce Visual Hook Guide: Archive / Shop / Cat Pages

WooCommerce Visual Hook Guide: Single Product Page

Here’s a visual hook guide for the WooCommerce Single Product Page. This is part of my “Visual Hook Guide Series“, through which you can find WooCommerce hooks quickly and easily by seeing their actual locations (and you can copy/paste). If you like this guide and it’s helpful to you, let me know in the comments!

Now that you know the product page hooks, you can override the WooCommerce Single Product Page via your child theme’s functions. You can remove default elements (for example, the featured image, the add to cart form, related products…), you can add your custom elements by picking the correct positioned “hook” and triggering your function, and you can even “move” existing elements. Need a video tutorial? Watch it now β†’

Continue reading WooCommerce Visual Hook Guide: Single Product Page

WooCommerce Visual Hook Guide: Cart Page (Shortcode Version)

I’ve put together a visual hook guide for the shortcode-based WooCommerce Cart Page (you can find the block version here).

Please note – as of the date above, you can’t add any customization to the Cart Block yet (unless you find a workaround), so you’d better revert to the shortcode version in case you’re willing to personalize the Cart page, move elements around, hide default elements, add custom content, etc.

So, with this copy/paste hook document you can find WooCommerce Cart hooks quickly and easily by seeing their actual location.

The great thing is – all you need to do in your custom code is “add_action(‘hook_name’,’custom_function’);” and you can place your personalized content anywhere on the WooCommerce Cart Page.

Enjoy!

Continue reading WooCommerce Visual Hook Guide: Cart Page (Shortcode Version)

WooCommerce: Getting Started As An Expert – A Complete Guide

If you’re looking to start your own ecommerce store, no platform does it better than WooCommerce.

WooCommerce is your path to online selling success. It’s a flexible, open-source e-commerce plugin specifically built for WordPress websites. 

From setting up and customizing your shop, to mastering orders and sales tracking, this complete guide will walk you through becoming an accomplished WooCommerce expert.

Read on for all the info you need to get the ball rolling!

Continue reading WooCommerce: Getting Started As An Expert – A Complete Guide

WooCommerce: Duplicate Add to Cart Button @ Single Product Page

In case you have very long single product pages, it may be helpful to show the Add to Cart form at the bottom of the page or even inside the description tab.

Thankfully this is pretty easy and only requires one line of code. The only thing that you may want to change is the hook name, which defines the position of the button, and the priority, which defines the relative position of the element in case there are other ones “hooked” onto the same hook.

In this example, we will place the button at the very bottom of the page, below tabs, upsells and related products. Enjoy!

Continue reading WooCommerce: Duplicate Add to Cart Button @ Single Product Page

WooCommerce: Get All Shipping Zones & Rates

As an advanced WooCommerce developer, at some stage you’re really going to need this PHP function, the same way you often browse through Business Bloomer’s WooCommerce visual hook guides or the product / order / cart getters.

This time we go study how to “get” the shipping zones and rates, because it’s likely that you will need to loop through them when you need to display shipping rates somewhere, or for other custom functionalities. Enjoy!

Continue reading WooCommerce: Get All Shipping Zones & Rates

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

WooCommerce: Check If Product Belongs to Category / Tag

We’ve studied “conditional logic” extensively over the previous Business Bloomer posts. In today’s spin-off, I want to clarify how you can check if a given product belongs to a category, tag or custom taxonomy because this is one of the most used conditional logic scenarios.

It’s important to know that a product can be inside the “loop” (e.g. the shop page or a list of products), alternatively you may be on the single product page or have the product unique ID, or even you can check if a product category is inside the Cart. Finally, you can even run the product category check within an Order or an Order Email.

Either way, the function is always the same. You simply need to understand how to use it. Enjoy!

Continue reading WooCommerce: Check If Product Belongs to Category / Tag

WooCommerce: Products With Equal Height @ Shop Page

You know, that’s one of the biggest WooCommerce display issues.

Products may have images of different proportions, different title lengths, some have review stars and some don’t, making the “product grid” layout (product archive template) a big mess. 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: How to Customize Checkout For Conversions

I had the honor to speak at WCEU 2020 thanks to WooCommerce, who hosted me in their Sponsor track. It was a short and sweet lightning talk on the first day (Friday), called “Customizing The WooCommerce Checkout To Improve Conversions“, followed by a live coding session on Saturday.

Here’s the video recording of the lightning talk, as well as a few PHP and CSS snippets you can copy/paste to improve your WooCommerce Checkout and immediately expect an increase in conversion rate. So, enjoy the video and then go test the snippets you find below!

Continue reading WooCommerce: How to Customize Checkout For Conversions

WooCommerce: Add Upsell Area @ Checkout Page

If you want to increase your AOV (Average Order Value), you can definitely start from the WooCommerce Checkout page.

A client asked me to place a “Donation Area” close to the “Place Order” button (so at the bottom of the page, once customers are ready to pay) to drive more awareness around this add-on. All I had to do was creating hidden products with a donation value, use my own “Custom Add to Cart URL” guide to create add to cart links and print an HTML box right above the checkout button by using my WooCommerce Visual Hook Guide for the Checkout Page. Enjoy!

Continue reading WooCommerce: Add Upsell Area @ Checkout Page

WooCommerce: Display “New!” Badge on Recent Products

We already have a nice “Sale!” badge by default with WooCommerce – this shows on the Shop page once certain conditions are met.

Now, what if we wanted to show a “New!” badge for products published in the last 30 days? This would certainly grab the customer attention, and also communicate the fact your shop is constantly updating with new products and content (well, good for Google too, right?).

Well, here’s a simple snippet for you; simply copy/paste into your functions.php and magically a “New!” badge will show (note: CSS is not provided, you’ll need to adjust it based on your current theme and custom styles).

Continue reading WooCommerce: Display “New!” Badge on Recent Products

WooCommerce: 27 SEO Tips (For Non-Techies)

I had the pleasure to speak at WordCamp Milano 2018, and I had a blast! I believe the topic was pretty interesting, so you all deserve a long post recap with actionable tips and screenshots to understand basic WooCommerce SEO (video of the presentation will be available soon).

The following WooCommerce Search Engine Optimization tips are mostly non technical, and are aimed at WordPress and WooCommerce users who never heard of β€œschema”, β€œlong tail”, β€œ301” and β€œhreflang” (although if you did, please have a read anyway, make sure to post a comment and contribute to this post with your expertise).

The thing is – SEO is never going to die. Besides, Google & co. constantly improve their website ranking algorithms. This means what you learned 5 years ago in regard to SEO might not work today, and what you learn today might not work in 2 years time… you get the point.

In this blog post, we will analyze and study 27 evergreen SEO factors for WooCommerce websites. These should be applied (or not applied, as there are many “not to do” tips as well) to your ecommerce website at all costs if you believe you deserve better ranking (who doesn’t?). And as they’re evergreen, they’re likely not to go away for a few years at least πŸ™‚

So, let’s get started!

Continue reading WooCommerce: 27 SEO Tips (For Non-Techies)

WooCommerce: How to Display Custom Product Badges (e.g. %OFF, NEW, FREE)?

You would know by now ecommerce customers buy products for different reasons. Your store products might be cheaper than your competitors, maybe you offer better shipping rates, possibly you restock products more quickly than anyone else – or simply you’ve got a great product people keep buying.

One way to display your product features and benefits on the Shop page is by using “product badges”, a series of display messages that are able to communicate with the user immediately.

You’re probably already familiar with the “SALE!” badge that WooCommerce gives us by default. What if you wanted to show the exact percentage amount of that offer?

You’re also aware of the “Featured” option for WooCommerce products. Yes, they show in the “Featured” product shortcode, but what if you wanted the shop to display these special products in a different way, i.e. by using a special badge?

Well, there are millions of examples on how you could improve your products page (and single product page) by making the most of product badges. Thankfully there are snippets and plugins that can help you with that.

A little investment might mean better click-through rates and therefore higher conversion rates!

Continue reading WooCommerce: How to Display Custom Product Badges (e.g. %OFF, NEW, FREE)?