Just so you know, there is no need to hardcode WooCommerce URLs in your custom code! In fact, WooCommerce gives us helpful shortcut functions that we can reuse in our code to get cart, checkout, account and product URLs without wondering if they have been modified by the website owner e.g. example.com/cart to example.com/basket.
In this way, you can always make sure you’re getting the correct URLs without wasting time looking for page/product slugs. Enjoy!
Continue reading WooCommerce: Easily Get Cart, Checkout, Account, Product URLs
Now, this is a bit of a niche tutorial, but it may come useful you need to get a product permalink when it’s still a draft. As you can see from the screenshot below, this is helpful when the product URL is very long – in such a case WordPress truncates the “Permalink” string and you can’t really copy/paste.
For example, you may need the product URL for a scheduled blog post, a future newsletter, an email; in whatever case, this is a cool way to “get” the product URL and print it in the “Publish” meta box of the single product edit page. Enjoy!
Continue reading WooCommerce: Get Draft Product URL
WooCommerce permalink structure may appear unusual for newcomers. Those /product/ and /product-category/ parts of the URL are well-known distinctive features, but some experts don’t agree that this is the most convenient way to handle permalinks SEO-wise.
A popular thought is to always keep URL structure as simple as possible and remove any unnecessary parts of it. You don’t have to take the word of those experts or me since the official guideline from Google suggest to avoid lengthy URLs with unnecessary parameters.
So, what does that exactly mean for WooCommerce store builders?
First of all, URL bases like /shop/, /product-category/ and /product/ can be considered unnecessary as Google knows how to define shop and product pages without the need of specifying that inside the URL.
And probably you don’t want to create a false perception of site depth for crawlers so they don’t rate those pages lower than they should be. Again, a well-known precept – pages closer to the main folder (domain) are more meaningful for search engines.
If you agree with such statements, it would be helpful to understand how to redesign the permalink structure in WooCommerce. So read ahead to find out about that.
Continue reading WooCommerce: How To Change The Permalink Structure
Business Bloomer enters the world of Gutenberg today, and we do it with a simple customization tutorial related to the “Product Grid” WooCommerce Gutenberg Blocks: currently these are “Best Selling Products“, “Newest Products“, “On Sale Products“, “Top Rated Products“, “Products by Category” and use the same base code…
However, all of them use custom code and not the default WooCommerce templates (and therefore we can’t take advantage of the WooCommerce hooks for the shop / product archive / product loop unfortunately), so we need to find a workaround if we wish to remove some of the default elements that come up with the product grid items: product permalink, product image, product title*, sale badge, product price*, rating*, add to cart button* in this exact order.
* As you can see from the screenshot below, actually, you can already remove the information with an asterisk from the Block settings. So, in this article, we will see how to remove the rest in case you don’t want it: permalink, image, sale badge. Enjoy!
Continue reading WooCommerce Blocks: Hide Images Etc. From Product Grid Block
A BloomerArmada fan asked me a very interesting question: how can I link each product in the shop page to its own custom landing page as opposed to the default permalink?
Of course this applies when you don’t want to use the default single product page for all or some products. Clearly, you could set up a 301 redirect from the single product page to the landing page – that will help for SEO as well. But if this is temporary, or you need to still give access to the single product page later on, then a redirect is no good.
So, here’s how you can override the default permalink.
Continue reading WooCommerce: Change Product Permalinks @ Shop / Loop Pages
There is a slightly annoying thing on the WooCommerce Thank-You Page and WooCommerce emails. Users looking at the order table can actually click on the Products they just purchased and abandon the page before taking the action you want them to take (see image below).
So, I coded a simple PHP snippet to remove such links. As usual, 1 line of code is more than sufficient:)
Continue reading WooCommerce: Remove Link to Product @ Order Table
A fan requested an interesting edit on the Shop/Category page (or “loop”). Instead of having the default “Add to Cart” button, they wanted to remove that and substitute with a “View Product” button link to the single product page. Here’s the simple snippet – enjoy!
Continue reading WooCommerce: Remove Add Cart, Add View Product @ Shop Page
Today we take a look at the WooCommerce Loop / Shop Page and specifically at how to disable the link to the single products.
Some store owners prefer to skip the single product page, and simply have customers add to cart from the shop page. Enjoy!
Continue reading WooCommerce: Disable Link to Single Product @ Shop