I have a function that returns the $shipping_method_id
(for example flat_rate:3
). I would like to get the Zone name for this Shipping method rate ID…
How to get zone name according to the Shipping method rate ID?
I have a function that returns the $shipping_method_id
(for example flat_rate:3
). I would like to get the Zone name for this Shipping method rate ID…
How to get zone name according to the Shipping method rate ID?
Building a custom function that will use very simple SQL queries this way:
Code goes in function.php file of your active child theme (or theme) or also in any plugin file.
Tested and works.
Usage example (output the zone name):