Woocommerce Wc_Order shipping state – full string needed, two letters returned
-
When i’m getting the information from a WC_Order object in a plugin, i’m finding the “state” value is an abbreviation / code for the region entered in the checkout:
$order = wc_get_order( $orderId );
$shippingState = $order->get_shipping_state() //returns eg “HT” for Hertfordshire, “BK” for Berkshire etc.What i am looking for is the full (UK) string of the shipping state, but see it isn’t stored anywhere in the object?
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Woocommerce Wc_Order shipping state – full string needed, two letters returned’ is closed to new replies.