I know this is a bit out of date but it might help someone.
I experienced the same issue, the shipping zones had all disappeared and adding them back led to the error Igoro was seeing.
I’ve done some digging and the shipping zones are still present in the database – they’ve not been deleted. The problem appears to be with some code in the following script:
/wp-content/plugins/woocommerce-table-rate-shipping/inc/zone-list-table.php
There is some construct code at the top which should be calling the shipping zones out of the db when called by various functions, this doesn’t work… I’m not sure why perhaps it’s a wordpress/woocommerce update that’s tightened up some code.
There’s probably a more elegant solution but I managed to fix it with a hack. Please be aware this may only be a solution for sites that are already running the plugin – I’m not sure if it would work on new installs as I’ve removed a line of code that may be important! take a backup of the file first and use this at your own risk!
1) comment out line 239 which looks like:
$data = (isset($this->shipping_zones) && is_array($this->shipping_zones)) ? array_filter( (array) $this->shipping_zones ) : array();
2) Replace it with:
$data = get_option( 'be_woocommerce_shipping_zones' );
This will force a fresh call to the database for the zone data
3) Upload the change
4) Check the zone list in the admin area and you should see them all again.
5) Comment out line 348 which looks like:
$shipping_zones = $zoneListTable->shipping_zones;
6) Replace it with:
$shipping_zones = get_option( 'be_woocommerce_shipping_zones' );
This will fix the ‘edit’ screen for the zones.
7) Upload the change
8) Check the edit zone page in the admin area.
Good luck!
If the script gets updated in the future you’ll need to re-do this fix each time (unless of course the original developer sorts it!)
Cheers,
Luke