Thank you @caban13, you’re absolutely right; it’s true that this is a common exception to the general capitalization rule.
I’ve been thinking about how to implement what you’re suggesting, and I think I’ll approach it from two angles:
- Using the lists that WooCommerce already generates to exclude the states. This way, we can use existing lists without having to create new ones.
- Changing the current exclusions field so that, instead of being a comma-separated text field, it uses a multi-line textarea, which is more practical when copying and pasting lists.
I think this would cover almost any need while keeping the plugin as lightweight and error-proof as possible.
That said, if you choose to use the lists, be aware that you might accidentally cause errors by being too zealous, for example, if you manually force the “DE” status code to always be in uppercase, the exclusion field would also apply the exclusion to compound names like “José de Souza,” converting it to “José DE Souza,” so when I update the plugin (probably this weekend), I recommend, for what you’ve proposed, using the statuses that WooCommerce already has.
Fernando