WooCommerce: Hide Related Products @ Single Product Page

Adding content to the WooCommerce Single Product Page is super easy – but what if you wish to remove / hide a default element?

Well, in this case it gets even easier. All you need to know is the default hook used by WooCommerce – so that you can remove it with one line of PHP in your functions.php. You can find a list of default hooks here: (https://businessbloomer.com/woocommerce-visual-hook-guide-single-product-page/)

For example, how do we hide the Related Products? Well, here’s one line of code that will help you! Continue reading WooCommerce: Hide Related Products @ Single Product Page

WooCommerce: How to Customize Storefront Theme in a Few Clicks

If your WooCommerce website runs on Storefront theme (same as Business Bloomer), then you probably know it doesn’t come with a lot of customization options.

For developers like me, Storefront theme is ideal: it comes with many “hooks”, so that it’s easy to remove, move or add layout elements within a few lines of PHP.

But for those who do not develop or have no intention to waste time troubleshooting missing commas or fighting with FTP clients, well, there’s a plugin for that. And it’s developed and maintained by WooCommerce itself, so you can’t go wrong with the purchase and you’re guaranteed to have a fully working, up to date piece of software for the long term.

So, here’s a quick overview of what the plugin does. Enjoy!

Continue reading WooCommerce: How to Customize Storefront Theme in a Few Clicks

WooCommerce: Get Product Data (ID, SKU, $) From $product Object

I’ve been wanting to publish this guide for a long while. As a WooCommerce development freelancer, every day I repeat many operations that make me waste time… and one of them is indeed “How to get ____ if I have the $product variable/object?“.

For example, “How can I get the product SKU“? Or “How can I get the product short description“? Or maybe the product stock level, shipping class, tax class, price, regular price, sale price, and so on… hopefully this article will save you time.

Of course, not always you have access to the $product global – but you may know the $product_id. In this case, you can use the wc_get_product WooCommerce function to calculate the $product object – you find this case scenario below.

Other examples might be the order or the cart page. Once again, in here you don’t really have a $product available, so you have to loop through the order/cart items and “get” it. After that, you can then calculate and get any piece of information you require out of $product. Enjoy!

Continue reading WooCommerce: Get Product Data (ID, SKU, $) From $product Object

WooCommerce: How To Display Categories on Any Page

Bellini WooCommerce Product Categories

Categorizing products is a great a way to de-clutter your WooCommerce shop and intuitively guide users to the page they are looking for. In WooCommerce you can easily group your similar products under a category, making it easy for users to scan and find the products.

For Example, if you sell T-shirts, Shirts, Pants, and Sunglasses you can easily categorize T-shirts, Shirts, and Pants under “Clothing” category and Sunglasses under “Accessories”.

In WooCommerce shop or archive pages you can display only products, only categories or both products and categories together. In this article we will see how to create WooCommerce categories and display them on shop or archive pages.

Continue reading WooCommerce: How To Display Categories on Any Page

WordPress: 11 Things to Consider When Selecting a Theme

With seemingly thousands of Free and Premium WordPress themes out there, it can be tricky to pick the right WordPress theme for your business.

While launching a website seems easy, hardest part is finding a theme that meets your content requirement. There is not a single WordPress theme that would meet all the needs of all website owners. Every theme is built for a specific purpose and has its own strengths and weaknesses. Your job is to find the theme that meets your business’s needs.

While there are themes that do it all, they tend to be heavy and bloated because they are designed to meet the requirements of a wide range of website owners. In other words, they do everything but specialize in nothing.

Choosing these resource-consuming and feature-heavy WordPress themes is like getting operated on by a surgeon who has nothing but a Swiss army knife to perform all surgical tasks.

Finding the right WordPress theme requires more than just picking a theme based on look. In this article, we will provide some tips on what to look out for when choosing a WordPress theme. We will also recommend some free tools to help you check a theme’s credibility.

Continue reading WordPress: 11 Things to Consider When Selecting a Theme

WooCommerce: How to Add Scripts to the Checkout Page

A client needed to add her SSL Logo Seal to the checkout page. The problem is that the code she was given had also a JS part, together with a bunch of HTML.

Unfortunately you can’t just copy and paste JavaScript in the checkout page… you need a workaround!

In this article, we will learn about wp_footer, a handy WordPress hook to print anything inside the footer, a bit of conditional logic to target the WooCommerce checkout page only (and therefore excluding the Thank You Page and Order Pay Page), and how to print HTML inside a PHP function. Enjoy!

Continue reading WooCommerce: How to Add Scripts to the Checkout Page