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!
Here’s a visual HTML 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 Single Product Page hooks, 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 exactly where you like them to show! 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!
If you have country-specific shipping conditions, or you want to show a message conditionally upon 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.Continue reading WooCommerce: Show Message After 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
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 user role or user capability. For example, you may want to disable PayPal for “user role: shop_manager” or enable a specific gateway for “user role: customer”. All you need is pasting the following code in your functions.phpContinue 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 for a Specific Country