• Resolved robersw

    (@robersw)


    Thank you for your continued support as we work through our implementation.

    After additional testing and implementing a workaround for the product dimensions requirement, we’ve encountered another challenge that I’d like to bring to your attention.

    We currently use the Conditional Shipping for WooCommerce plugin to control shipping method availability based on Shipping Classes, Order Amount, and Shipping Destination. With our current configuration, where multiple couriers are consolidated into a single shipping method, we’ve lost the ability to apply conditional rules to individual couriers within that method. The plugin can only enable or disable the entire shipping method rather than specific courier service options.

    This limitation impacts our ability to implement business rules such as restricting certain carriers based on product characteristics, order value thresholds, or destination-specific requirements.

    Any thoughts on this use case?

    • This topic was modified 6 months, 3 weeks ago by robersw.
    • This topic was modified 6 months, 3 weeks ago by robersw.
    • This topic was modified 6 months, 3 weeks ago by robersw.
Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Support IQComputing Alex

    (@iqcalex)

    @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.

    Thread Starter robersw

    (@robersw)

    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???

    Plugin Support IQComputing Alex

    (@iqcalex)

    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”.

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Ability to Apply Conditional Rulesets’ is closed to new replies.