Displaying Country Names in Multiple Languages on WooCommerce Checkout

In a recent Business Bloomer Club discussion, a user faced a challenge with WooCommerce’s country dropdown on a Bulgarian-language site. While the checkout country field displayed country names in Bulgarian by default, international customers needed to search using English names, creating a usability gap.

The user sought a way to add English names alongside Bulgarian in the dropdown, allowing search functionality for both languages.

Through a collaboration in the forum, the user leveraged the woocommerce_countries_allowed_countries filter to display country names in both Bulgarian and English. By setting up an array of English country names and merging them with the default Bulgarian names, they successfully enabled bilingual search functionality in the country dropdown.

Continue reading Displaying Country Names in Multiple Languages on WooCommerce Checkout

Working with Porto Theme’s Custom Country Selector on WooCommerce Checkout

In a recent Business Bloomer Club discussion, a member encountered an issue with the Porto theme’s checkout customization in WooCommerce.

Specifically, Porto replaces the standard WooCommerce select dropdown for country selection with a custom element, making it difficult to trigger certain events, like reloading the checkout when a country changes. Here’s how to handle custom elements like these and ensure checkout updates work smoothly.

Porto’s theme uses the Select2 script to enhance standard select elements, replacing the default WooCommerce country selector. This can prevent traditional jQuery selectors from working as expected when trying to detect changes and update the checkout page.

Continue reading Working with Porto Theme’s Custom Country Selector on WooCommerce Checkout

How to Set the Default Country to USA in WooCommerce Checkout

In a recent Business Bloomer Club Slack thread, a member asked how to set the default country to the United States on the WooCommerce checkout page.

By default, WooCommerce may set the country field to a different option, depending on settings or user location, but it’s possible to customize this to ensure the United States (or any other country) appears as the default in both the billing and shipping fields.

Here’s a quick guide on how to adjust the default billing and shipping country fields to streamline the checkout experience for US-based customers.

Continue reading How to Set the Default Country to USA in WooCommerce Checkout

WooCommerce: Read-only Checkout Fields

Especially for B2B sites, it’s likely that customers are managed by the store admin and are not allowed to change their billing/shipping address unless they request to update it.

But even if you’re simply curious, there is a way to turn each checkout field into read-only inputs. In this way, the saved billing and shipping address will load, and the logged in customer won’t be able to change any data before checkout.

A little note: country and state are dropdowns, and this means adding the “readonly” attribute won’t stop you from changing the selected value. However, if we turn all fields to input type “text”, this problem will go away. And this is why you find two statements in the snippet below; first we turn the field into a text input, and then we make it read-only.

Enjoy!

Continue reading WooCommerce: Read-only Checkout Fields

WooCommerce: Set Customer Default Tax Location

The WooCommerce settings allow you to define the default customer tax location (“Calculate tax based on” -> “Shop base address“). In this case, when a guest customer enters the checkout, tax will be calculated based on the store address.

The problem is that this option is unusual – businesses require the “Calculate tax based on” -> “Customer billing address” option in most cases.

So, today, we will be setting the default tax location when “Customer billing address” has been chosen AND the customer is either logged out (so, no billing address is set) or logged in but have no saved address (for example, a brand new customer). Enjoy!

Continue reading WooCommerce: Set Customer Default Tax Location

WooCommerce: Get EU, EU VAT, EEA, SCA Countries

When you deal with conditional payment gateways, or conditional notifications, or conditional content, you may need to use to check the current billing country against an array of countries (in plain English, you may want to know if the customer is based in a specific World area), such as the European Union.

Thankfully, WooCommerce gives us a nice prebuilt function so that we don’t need to create the array of EU countries manually. On top of that, it’s easy to manipulate that array in order to add / remove countries for different uses, such as getting the list of EEA (European Economic Area) countries or SCA (Strong Customer Authentication) countries. In this post, I will give you some shortcuts to “calculate” these arrays, so that you don’t need to bother doing it.

Please note, EU, EEA and SCA countries are constantly changing, so these arrays are updated to the date you see on top of this post. Enjoy!

Continue reading WooCommerce: Get EU, EU VAT, EEA, SCA Countries