Great question — answering as the UphillTech team:
It was a silly mistake. I had initialized the WCS_City_Shipping_Method class in the initialization code of the plugin class for this custom shipping method. The code was running before Woocommerce was ready and so causing fatal error. I had missed this important line from Woocommerce Shipping API documentation : To ensure the classes you need to extend exist, you should wrap your class in a function which is called after all plugins are loaded. Anyways, I solved issue by not initializing the class and wrapping it into a method which runs on plugins_loaded action hook. Here are the changes: public function plugins_loaded_action() { // Load shipping method class add_action(...
Full answer by rmbits: https://stackoverflow.stackexchange.com/a/49871656 (CC BY-SA 3.0).
Need it done for your business? UphillTech.