Shipping Zone on Custom State doesn’t work
-
Hi,
I am developing a website for a client.
They are only dealing with 2 counties in Northern Ireland so I used the following code (in my functions.php file) to override the Counties on the UK dropdown
function custom_woocommerce_states( $states ) { $states['GB'] = array( 'FER' =>'FERMANAGH', 'TYR' =>'TYRONE' ); return $states; }This works fine. I’ve also set up a shipping zone so that if a visitor enters a postcode outside of a list they are told there are no shipping methods for the postcode.
I added “FERMANAGH” and “TYRONE” as created above to this shipping zone.
However, when checking out, after entering the relevant information and hitting Update the calculation for shipping doesn’t happen and the “Enter your address to view shipping options” appears again. I checked the console log in the browser and there are no errors.
If I remove my custom state code and check out, the postcode check works fine.
So the question would be can shipping zones be applied correctly to a custom state?
Cheers!
The topic ‘Shipping Zone on Custom State doesn’t work’ is closed to new replies.