WooCommerce: Change Number of Products Per Page

If you’re not happy with the default number of products per page (16), or if your theme overrides the default WooCommerce setting for “per_page” products and you need to change it, here’s the fix for you.

Please note that you may also need to set the number of WooCommerce product grid columns, so that you can make sure the total number of products per page is a multiple of that and you don’t leave the shop page with empty grid items.

Enjoy!

Continue reading WooCommerce: Change Number of Products Per Page

WooCommerce: Disable Payment Gateway by Country

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

WooCommerce: How to Translate / Rename Any String

There are times you don’t want to translate the whole installation of WooCommerce just for renaming one short string. There are times you need to rename a label or a little thing and don’t feel like installing a bloated translation plugin.

It doesn’t matter whether you want to rename a string in the original language (English, usually), or change the default translated string in a different language. Either way, and thankfully, there’s a little PHP snippet that will work for you instantly. Enjoy!

Continue reading WooCommerce: How to Translate / Rename Any String