Here is a collection of tips, snippets, customizations, plugin reviews and how-to tutorials to answer your biggest WooCommerce questions, curated by Rodolfo Melogli.
Please remember feedback is vital and that your social media shares, blog comments and WooWeekly newsletter sign ups help me understand which WooCommerce content works and which not, so that I can fine-tune my writing :)
Thank you in advance and enjoy!
WooCommerce Blog Search Filters
Top searches:
Visual Hook Guides - Checkout Page - Cart Page - Single Product Page - Add to Cart - Emails - Shipping - Prices - Hosting
Popular tags:
Accessibility (2) -
ACF (6) -
Add to Cart (31) -
Affiliate (4) -
Ajax (4) -
AOV (10) -
Apps (2) -
B2B (11) -
Backorder (4) -
Blog (1) -
BOGO (5) -
Breadcrumb (3) -
Bulk Discounts (4) -
Cart Abandonment (9) -
Cart Page (77) -
Cart Totals (3) -
Catalog (8) -
Category Page (16) -
Checkout Fees (6) -
Checkout Fields (30) -
Checkout Page (117) -
Child Theme (2) -
Conditional Logic (11) -
Contact Form (4) -
Coupon (11) -
CRO (6) -
Cron Jobs (1) -
Cross-sells (8) -
CSS (9) -
Currency (6) -
Custom fields (11) -
Customer (4) -
Customer Login (6) -
Customer Registration (6) -
Customization (14) -
Database (5) -
Dimensions (1) -
Discount (8) -
Divi Theme (2) -
Downloadable (4) -
Dropshipping (2) -
Dynamic Pricing (5) -
Elementor (13) -
Email Marketing (12) -
Emails (24) -
Empty Cart (2) -
External Products (5) -
Facebook (1) -
Featured Image (11) -
Flatsome Theme (1) -
Freelancing (1) -
Frontend (4) -
GDPR (5) -
Geolocation (5) -
Germanized (1) -
Getters (3) -
Gift Cards (3) -
Google Ads (1) -
Google Analytics (19) -
Grouped Product (2) -
Gutenberg (4) -
Hidden Products (3) -
Hosting (6) -
Import/Export (4) -
Invoicing (3) -
Jetpack (3) -
Kirki (1) -
Landing Page (2) -
LMS (2) -
Logged in (5) -
Loop Pages (9) -
Marketing (13) -
Membership (2) -
Metorik (6) -
Mini Cart (1) -
Multi-Vendor (2) -
My Account (32) -
Online courses (2) -
Order (37) -
Order Notes (3) -
Order Pay (4) -
Order Status (13) -
Payment Gateways (26) -
PayPal (13) -
PeachPay (1) -
Performance (9) -
Permalink (6) -
Points and rewards (1) -
Premium Snippet® (2) -
Price (37) -
Privacy Policy (2) -
Product Add-Ons (5) -
Product Attributes (1) -
Product Badges (3) -
Product Bundles (1) -
Product Category (18) -
Product Filter (4) -
Product Gallery (2) -
Product Quantity (15) -
Product Reviews (5) -
Product settings (1) -
Product Sorting (3) -
Product Table (5) -
Product Tabs (12) -
Product Tag (4) -
Product Visibility (4) -
Purchased (3) -
Quick view (1) -
Redirect (9) -
Related Products (10) -
Request a Quote (5) -
REST API (1) -
Sale Price (8) -
Sales (1) -
Sales Conversion Rate (22) -
Search (14) -
Security (1) -
Sensei (1) -
SEO (16) -
Shipping (32) -
Shop Page (57) -
Shopify (2) -
Shoptimizer theme (5) -
Short Description (4) -
Shortcodes (14) -
Sidebar (2) -
Single Product Page (114) -
SKU (7) -
Social Media (1) -
Speed (3) -
Staging (5) -
Stock (20) -
Storefront Theme (17) -
Stripe (7) -
System Status (5) -
Tax (3) -
Terms and Conditions (3) -
Thank You Page (18) -
Tracking (4) -
Translation (5) -
Troubleshooting (7) -
Up-sells (11) -
Update Cart (3) -
User Roles (7) -
UX (4) -
Variable Products (24) -
Variation (5) -
Virtual Product (1) -
Weight (6) -
Wholesale (7) -
Widget (4) -
Wishlist (3) -
WooCommerce Admin (45) -
WooCommerce Blocks (1) -
WooCommerce Bookings (1) -
WooCommerce Brands (1) -
WooCommerce Coupons (6) -
WooCommerce Deposit (2) -
Woocommerce Subscriptions (8) -
WordPress (2) -
Latest WooCommerce Tutorials

I am a big fan of Elegant Themes, but a lot of CSS styles (mainly in Divi) contain “!important” in order to override WooCommerce styles when using the two in a combo. Now, the big problem is that we can’t override !important with another !important. Divi will win. But no matter whether Divi has been developed in a good or not so good way, there is something we can do. (NOTE: using !important is a horrible thing in CSS. Use at your own risk) Continue reading WooCommerce and Divi: how to override !important CSS

Let’s say you require to make the “address” field at checkout bigger. Instead of an “input type = text”, we’d require an “input type = textarea” in HTML. This was my WooCommerce client’s challenge: how can I edit a checkout field input type programmatically? Here’s the snippet! Continue reading WooCommerce: Change Input Field to Textarea @ Checkout
Here’s how to limit your WooCommerce Cart to just one product at a time.
This simple PHP snippet can be used for many applications. For example, your store may only allow to buy one subscription at a time. On this same website, on the other hand, customers can only purchase one product at a time so it’s easier for me to manage invoicing and payments, given that I switch PayPal and Stripe accounts based on what’s inside the cart.
Here’s the quick fix – enjoy!
Continue reading WooCommerce: Only Allow 1 Product in the Cart
When building custom functions and using hooks and filters, you may want to apply those changes to a unique product id: “If product id = xxx, then execute this function”.
Honestly, I tried to do that with the simplest of all solutions (is_single WordPress conditional tag) but it didn’t work for me. Hopefully, I can help you solve this in 2 seconds!
Continue reading WooCommerce: is_single() Doesn’t Work [Solved]

On a recent job, a client asked me to get the logged in username in WooCommerce. Interesting task! He needed to show that on the checkout form page and also on the order email. Actually, this is quite simple to do and can be used for several applications. Continue reading WooCommerce: Get/Edit Logged in Username @ Checkout
A client needed to add “something” upon product publishing. For example, product meta key “total_sales” with value = 0 gets added automatically once a WooCommerce product is created.
So, how do we run (“hook”) our function when a new product is published?
Continue reading WooCommerce: Do Something When Product is Published
When you apply a coupon code programmatically, for example, you may want to hide the coupon code on the cart and checkout page so that the code stays private and cannot be shared with others.
This solution will basically remove the coupon code (e.g. “VWXYZ”) from the “Coupon: VWXYZ” string that appears in the Cart and Checkout totals. Enjoy!
Continue reading WooCommerce: Hide Coupon Code @ Cart & 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
Just say thanks to YOAST SEO plugin, that’s all you need to know. No PHP, no editing template files… just a simple setting in YOAST SEO for WordPress. That’s it 🙂
Continue reading WooCommerce: How to change Shop Page SEO Meta Title (“Products Archive”)

Yes, Jetpack Sharing has an option to show the Sharing buttons on the WooCommerce Single Product page. But this does not mean your template is compatible with that! If you have ticked “products” and JetPack Sharing buttons are not showing, you can use this simple snippet. Continue reading WooCommerce: JetPack Sharing Not Showing? [resolved]
A simple function for a very common issue: “I can’t find where to change the PayPal icon?”. If you have the same problem, here’s a quick PHP fix.
Continue reading WooCommerce: Change the PayPal Icon @ Checkout Page
Users can manually enter a coupon code, refresh the Cart and see their discount apply… or you can do that automatically (or “programmatically” as we say in the dark web) when a user adds a product to the WooCommerce Cart 🙂
All you’ve got to do is creating a coupon, and then a PHP function will do the whole work. Automation is the best thing in the world!
Continue reading WooCommerce: Apply Coupon Programmatically if Product @ Cart

I developed a custom payment gateway plugin for a client, who wanted to add a similar method to “cod” (cash on delivery). FYI, he wanted to add a method called “card on delivery”. I simply duplicated the code, added the PHP to a file, made a plugin and gave him the plugin zip file. And everything was working great… until he did a test checkout. Continue reading WooCommerce: Fixing Fatal error Call to undefined function wc_get_order()
Sometimes solutions are very simple, and you don’t need rocket science to fix your issue!
A client of mine needed to hide a category from the Product Categories Shortcode (“product_categories”); in fact, there is no parameter that allows you to “exclude” a given product category such as “uncategorized” or whatever category you wish.
A rare issue, but once again a quick fix! Here’s how you do it.
Continue reading WooCommerce: Exclude Category from Shortcode
This is an interesting topic. A WordPress/WooCommerce client could not add CSS via the usual way. In fact, Gravity Forms plugin (and in particular the “directory” extension), stores entries in the database BUT the directory page and the entries filtered list have the same classes, ids, and cannot be “targeted” with CSS.
Long story short, and Gravity Form or not Gravity Form, here’s the snippet you can use to add CSS to any WordPress page as long as you know its URL.
Continue reading WordPress: How to Add CSS to a Specific Page URL
A client asked me to customize the Product Categories Widget that comes included with WooCommerce. In this case, they wanted to show ALL categories but the current one (when looking at a category page of course).
You can also use this tutorial to hide certain category IDs from the widget, or maybe “all product category names that start with a given string of text”. Case studies are millions, but the code base is always the same – we’ll make use of the “woocommerce_product_categories_widget_args” filter and provide a list of product categories to exclude. Enjoy!
Continue reading WooCommerce: Hide Categories From Product Cat Widget
When you have special shipping requirements, maybe you want checkout users to see the shipping form section visible on load.
Here’s how you do it. You’ll also find the opposite task in case you happen to have the shipping form opened by default and you want to hide it. Enjoy!
Continue reading WooCommerce: “Ship to a Different Address” Opened by Default
A client asked me to completely remove the message that appears after you add a product to the cart from the product page. This is simply done by using a PHP snippet, so here’s the quick fix for you!
Continue reading WooCommerce: Remove / Edit “Added to Your Cart” Message

I worked with a client who uses the Shipstation plugin. After updating to the latest version of WooCommerce (2.2), the plugin stopped working and its tab under “settings” could not be clicked. On top, some of the dropdowns got broken. Here’s the fix, hoping that Shipstation updates the plugin asap. Continue reading WooCommerce: Shipstation plugin is broken [solved]
How can you redirect customers to a beautifully looking, custom, product-specific thank you page?
Thankfully you can add some PHP code to your functions.php and define a redirect to a custom URL (as opposed to the default order-received endpoint). This is a great way for you to add specific up-sells, social media share and other information that could help you convert additional sales.
Continue reading WooCommerce: Redirect to Custom Thank you Page