I'm not even sure if this is possible as I haven't been able to find anything that could help me figure out this, so I thought I'd ask.
I have a wordpress site with a user registration plugin that has a select dropdown state field with an array:
$array = array(
'AL' => 'Alabama',
'AK' => 'Alaska',
'AZ' => 'Arizona',
'AR' => 'Arkansas');
I'm trying to sync this field with woocommerce's billing_state field, which from what I can tell uses the abbreviations instead of the full name (Al, instead of Alabama).
I figured I would use the dropdown field to get the selected state and pass it along to the billing_state field by using the value attribute, but this passes along the full name, is there a way to retrieve the key instead and pass it on to the value of the input field?
Any help will be appreciated!