@robersw Hello!
This is a tough one. Conditional Shipping for WooCommerce bases it’s conditional logic on Shipping Methods, but this ShipStation implementation is a single Shipping Method which pulls from all the selected ShipStation carriers. The Carriers are connected via ShipStation, not directly to WooCommerce. You could create multiple ShipStation Shipping Methods based on Shipping Zones then select the specific Carrier Serivces to query, but to make each Carrier it’s own Shipping Method based on API callbacks (since all the Carrier connections live _on_ ShipStation) may prove to be difficult and cumbersome.
Maybe a dynamic Shipping Method could be created which inherits it’s calculation and packaging methods, but this is something we would need to explore in depth and would require an overhaul of the Shipping Method Class to allow dynamic creation based on the initial selected / supported carriers.
Maybe a more feasible solution would be to see if the Conditional Shipping for WooCommerce plugin has hook implementations which could be used to filter the rules and integrate the ShipStation Integration Settings.
These ideas are just off-the-cuff though and have not been explored in depth. We’ll keep an eye on this, and are open to ideas, but this feature will likely take a backseat to the Custom Packages and Label Creation features already planned.
Thanks for the quick response. Creating multiple Shipping Methods was a good thought we hadn’t tried. Unfortunately it only returns whichever method is on top. Maybe that would be something to investigate about capturing data from multiple methods per API call???
Unfortunately, after looking into this, I wasn’t able to find a way to do this.
WooCommerce relies on static Class Names for defining Shipping Methods. Throughout the WooCommerce plugin, they call new $shippingMethod() which prevents us from separating out the different Shipping Services into their own Shipping Methods. I tried to play around with spl_autoload() and class_alias() to try and “trick” WooCommerce into thinking it was loading a different Shipping Method that inherits the base Shipping Method class, but each time it came up short.
For us to separate our Shipping Services into separate Shipping Methods, WooCommerce would need to modify how they instantiate Shipping Methods, either by passing in an array of args, additonal args, or by creating a centralized place where the Shipping Methods get instantiated (and have the necessary hooks).
We’re open to suggestions, ideas, or routes to explore but after the above research, I’m going to resolve this ticket for now as “not planned”.