This code snippet modifies the subject line of completed order emails in WooCommerce specifically for downloadable products (such as eBooks). By checking the product category, it ensures that the email subject is relevant and informative for the customer. Add the code to your child theme’s functions.php file or through the Code Snippets plugin.
how to
How To Change Product Author in WooCommerce: A Useful Plugin Overview
By default, WooCommerce doesn’t provide the option to display or change the author of a product. This can be inconvenient, especially if you need to assign or reassign the author of a product. Our plugin addresses this issue by adding support for the ‘author’ field to the WooCommerce ‘product’ post type. Once installed, the product […]
How to Remove the Category Prefix from WordPress URLs
If you have decided to remove the ‘category’ prefix in the site url for category pages, you need to do the following steps: If nothing changes after that, then try adding a snippet to the functions.php file of your child theme (or use a plugin to insert snippets). After following these steps, the category pages […]
How To Remove Product Attributes (Variations) From Woocommerce Emails.
In this tutorial, you will learn how to hide specific product attributes from WooCommerce order confirmation emails. There are usually two ways used for this purpose. The first way is to change the email template. The second way is to write a short snippet that will solve this problem. In this article, I will explain […]
Fixing Date Placeholder Issues in Booking Forms on Mobile Devices
Hey, everybody! Recently, one of my clients encountered a bug in their booking form: the field for entering the date just looked grayed out, with no date format markup (DD-MM-YYYY). This caused many users to get confused and not fill out this field, which led to problems when making reservations. Before/After: To fix this issue […]
How To Add a Badge To Selected Products – Woocommerce
Today let’s look at a simple snippet that hopefully will help someone:)Task: The client wanted to add badges to some products, depending on the season. First I created four new categories (winter, spring, summer, autumn) and then added the code to functions.php. And styling: /*seasonal badges*/.winter-badge, .spring-badge, .autumn-badge, .summer-badge {padding: 3px 4px;text-align: center;background: #FFFFFF;font-weight: bold;position: […]


