This post is about a simple helper for Elementor that will make your life easier. If you’ve ever created your template for Elementor, you’ve probably encountered the problem that you can’t set an additional class for the entire template. Yes, you can add a class for any block, element, or section, but you can’t do […]
WordPress & WooCommerce Hooks and Snippets: Customizing and Extending Functionality
Enhance your WordPress and WooCommerce sites with powerful hooks and custom code snippets. Hooks let you extend or modify functionality without touching core files, making your site more flexible, efficient, and easier to maintain. This method ensures your customizations remain update-friendly and aligned with your business needs.
Whether you’re optimizing for speed, tightening security, or adding new features, these code snippets offer practical solutions. From small enhancements to advanced customizations, you’ll find tools to fine-tune your site and unlock its full potential.
How to Temporarily Disable WooCommerce Shopping for the Holiday Season
The holiday season is a great time to take a break and recharge. But what happens to your WooCommerce store while you’re away? To avoid confusion and ensure your customers know you’re closed, you can temporarily disable shopping features and display a clear holiday notice on your website. Here’s a simple PHP snippet that achieves […]
How to Change Completed Order Email Subject for Downloadable Products in WooCommerce
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 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 […]
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: […]