Here’s a super quick snippet you can use to rename the WooCommerce checkout “state” field label for both billing & shipping.
Of course you can learn by example and apply the same snippet to other checkout fields, all yopu need to change is the field ID. Enjoy! Continue reading WooCommerce: Rename “State” Label @ Checkout
I’m surprised WooCommerce doesn’t offer this field out of the box. Most ecommerce websites actually require a shipping phone to organize delivery and communicate with the end customer in case there are problems.
Thankfully, there is a hook (filter) for that. It’s called “woocommerce_checkout_fields” and can be used to remove, move or add checkout fields quickly. And here’s how to add, for example, a new shipping field called “shipping_phone”. Enjoy! Continue reading WooCommerce: Add Shipping Phone @ Checkout
This is a very specific function. Sometimes, you need to “set” a checkout field value upon order creation (because it was not required and left empty for example). In some other cases, you might want to override what the customer input if you have certain requirements.
Either way, overriding the checkout fields on order creation is super easy. Here’s how it’s done – enjoy! Continue reading WooCommerce: Set Checkout Field Value @ Order Creation
If you’re familiar with the upcoming Gutenberg editor, you’ll know there have been a million doubts in regard to accessibility. So, accessibility matters – and WooCommerce has a few issues as well.
One interesting accessibility fix is the error notification system on the checkout page. Yes, the missing fields error show on top of the page when trying to place an order, but once you scroll down to fill them out again you might need a reminder of which field is missing without having to scroll back up to check the error.
This is quite difficult to explain, so take a look at the screenshot. The suggestion here is to also add “inline” error notifications (“XYZ is a required field“) right above each field, so that the user knows exactly what to do. So, let’s see how it’s done. Continue reading WooCommerce: Display Required Field Errors “Inline” @ Checkout