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