WooCommerce: Hide Prices on the Shop & Category Pages

Interesting WooCommerce customization here. A client of mine asked me to hide/remove prices from the shop page and category pages as she wanted to drive more customers to the single product pages (i.e. increasing the click-through rate).

As usual, a simple PHP snippet does the trick. I never recommend to use CSS to “hide” prices, as they would still be visible in the code – PHP stops the prices from loading, so they’re invisible to the user. Continue reading WooCommerce: Hide Prices on the Shop & Category Pages

WooCommerce: Disable Payment Gateway for Specific User Role

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.php Continue reading WooCommerce: Disable Payment Gateway for Specific User Role

WooCommerce: Hide Shipping Rates if Free Shipping Available

If Free Shipping is available, you possibly don’t want to show the other paid shipping options. WooCommerce shows by default all shipping rates that match a given shipping zone, so it is not possible to achieve this from the settings alone.

You need PHP for that. In this example, we will disable all shipping methods but “Free Shipping” so that free shipping remains the only possible shipping method. And here’s the code to add to your functions.php ๐Ÿ™‚ Continue reading WooCommerce: Hide Shipping Rates if Free Shipping Available