Here’s a visual HTML hook guide for the WooCommerce Checkout Page.
This visual guide belongs to my “Visual Hook Guide Series“, that I’ve put together so that you can find WooCommerce hooks quickly and easily by seeing their actual locations – and you can also easily copy & paste. Enjoy!
Continue reading WooCommerce Visual Hook Guide: Checkout Page
A WooCommerce Customization client wanted to add some text above the “Login” and “Register” boxes on the My Account page. Understandably, users may need a bit of an explanation before they take action. Here’s how you do it!
Continue reading WooCommerce: Add Content @ My Account Register / Login Page
I’ve created a visual HTML hook guide for the WooCommerce Archive Page (which is the same page for the Shop, Category, Tag pages). This visual guide belongs to my “Visual Hook Guide Series“, that I’ve put together so that you can find WooCommerce hooks quickly and easily by seeing their actual locations (and you can also copy/paste). If you like this guide and it is helpful to you, let me know in the comments!
Thanks to this WooCommerce Archive Visual Hooks Guide, you can now go to your template’s functions.php file and use “add_action(‘place-hook-here’,’your-PHP-function-here’);” – you can then place your custom functions exactly where you like them to be. Enjoy!
Continue reading WooCommerce Visual Hook Guide: Archive / Shop / Cat Pages
Here’s a visual hook guide for the WooCommerce Single Product Page. This is part of my “Visual Hook Guide Series“, through which you can find WooCommerce hooks quickly and easily by seeing their actual locations (and you can copy/paste). If you like this guide and it’s helpful to you, let me know in the comments!
Now that you know the product page hooks, you can override the WooCommerce Single Product Page via your child theme’s functions. You can remove default elements (for example, the featured image, the add to cart form, related products…), you can add your custom elements by picking the correct positioned “hook” and triggering your function, and you can even “move” existing elements. Need a video tutorial? Watch it now →
Continue reading WooCommerce Visual Hook Guide: Single Product Page
I’ve put together a visual (yet, you can copy/paste!) hook guide for the WooCommerce Cart Page. If you like this and it is helpful to you, let me know in the comments and I’ll create another one for the checkout, single product page and my account page.
You can find WooCommerce Cart hooks quickly and easily by seeing their actual locations. Great thing is – all you need to do in your functions.php is “add_action(‘place-hook-here’,’your-PHP-function-here’);” and you can place your custom functions anywhere on the WooCommerce Cart Page. Enjoy!
Continue reading WooCommerce Visual Hook Guide: Cart Page
If you have country-specific shipping conditions, or you want to show a message conditionally after country selection on the checkout page, here’s a simple WooCommerce PHP snippet you can freely use. This can be slightly customized to target state selection instead.
I’ve also edited the initial code to make this work on load as well, so that the message would conditionally show even then. Enjoy!
Continue reading WooCommerce: Show Message Upon Country Selection @ Checkout
This is a workaround to Limit Shipping and Billing to One State Only. In two of my previous posts (Limit Shipping to One State Only and Limit Billing to One State Only) we’ve seen similar functionalities. In this case, let’s imagine we want to avoid that the user selects unwanted states. Continue reading WooCommerce: Limit State Dropdowns to One State Only
Here’s a simple PHP snippet to remove the annoying “Order Notes” / “Additional Information” on the checkout page. This section can usually be found below the shipping form (or the billing form if you have no shipping). Thankfully, you just need 1 line of custom PHP!
Continue reading WooCommerce: Hide “Order Notes” @ Checkout
Very similar to the “Limit shipping to one State only“, this time we want to limit the Billing to only one state. An Australian client asked me to limit their sales to the South Australia state, but the same can be applied to US, UK and all the other countries that have states.
Continue reading WooCommerce: Sell to One State Only
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
For some reason, sometimes you add products to cart but the cart page stays empty (even if you can clearly see the cart widget has products in it for example).
But don’t worry – it may just be a simple cache issue (and if you don’t know what cache is that’s no problem either) or a theme / plugin “conflict”.
The WooCommerce Cart page is extremely delicate; it displays dynamic content based on cookies and PHP sessions, is coded with PHP but also JS and Ajax, requires to be excluded from cache and is subject to problems in case of out of date software.
So, here’s your “Empty Cart” troubleshooting checklist you can follow without any technical knowledge.
I also recommend you read through the (many) comments, because many developers shared what worked for them too. Good luck!
Continue reading WooCommerce: How to Fix the “Cart is Empty” Issue
Interesting issue. A client found out that if you push the “enter” on your keyboard while on the WooCommerce Checkout page, the form will be automatically submitted. Ouch! What if the customer wanted to use a different shipping method? What if “enter” is pushed by mistake? So, here’s how you disable it. Continue reading WooCommerce: Disable Keyboard “Enter” on Checkout Page
This is a cool function you can apply to any payment gateways for any order threshold. for example, you may want to disable bank transfers if orders are below $10, or disable PayPal payments if orders are above a certain cart total. Here’s what I did. Continue reading WooCommerce: How to Disable PayPal on Orders Above $100
A client asked me to add a “Free Shipping” notice under each WooCommerce product on the Shop Page. This can increase your click-through rate and hence your sales conversion rate. Here are a couple of PHP and CSS snippets so that you can implement this helpful edit. Continue reading WooCommerce: Add Text Under Each Product @ Shop Page
You may want to disable payment gateways depending on the logged in user role. For example, you may want to disable PayPal for user role “subscriber” or enable a specific gateway for user role “customer”.
All you need is to paste the following code in your functions.php or to install a super simple plugin. Enjoy!
Continue reading WooCommerce: Disable Payment Gateway for Specific User Role
You might want to disable PayPal for non-local customers or enable a specific gateway for only one country… Either way, this is a very common requirement for all of those who trade internationally.
Here’s a simple snippet you can further customize to achieve your objective. Simply pick the payment gateway “slug” you want to disable/enable (“paypal”, “authorize”, “stripe”, etc.) and the country code (US, ES, IE, etc.) and then apply your conditional rules in the plugin below.
Continue reading WooCommerce: Disable Payment Gateway by Country