• Resolved Epicode

    (@egmdev)


    Currently it doesn’t seem possible to apply a shipping rule based on a Woocommerce Shipping Class.
    We have the following shipping class “Free Shipping” which is applied to some products to force free shipping, I can’t find any setting in the DHL plugin to force Free Shipping when this class is present.

    Is there a way to force Free Shipping with a Shipping Class just like the rules for Weight or Cart Total ?
    If it’s not possible in the config options is there maybe a hook/filter we can use to make this possible ?

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author Shadi Manna

    (@shadim)

    I am not sure how the “Free Shipping” is linked to the DHL label creation, can you clarify?

    Thread Starter Epicode

    (@egmdev)

    Hi @shadim,

    Thanks for the fast reply, the “Free Shipping” shipping class is applied to some products in Woocommmerce, these products should receive no shipping cost for the DHL Shipping method.

    However I see no option in the DHL plugin to set the shipping price of the “ServicePoint delivery” to € 0,- based on the shipping class.
    I expected there to be a rule that can be applied to the Shipping Class just like there is with Cart total & Weight.

    Currently we have the following setup:

    • Shipping price = € 1,95, if Cart total exceeds € 25,- change shipping price to 0,-

    But we need a additional rule to be applied:

    • Shipping price = € 1,95, if product has Shipping class “Free Shipping” change shipping price to 0,-

    Hope this makes sense, if you have any follow-up questions please let me know.

    • This reply was modified 3 years ago by Epicode.
    • This reply was modified 3 years ago by Epicode. Reason: format issue
    Plugin Author Shadi Manna

    (@shadim)

    Which country is your shop based in?

    Thread Starter Epicode

    (@egmdev)

    The Netherlands

    Plugin Author Shin Ho

    (@shindhl)

    Hello egmdev,

    Thanks for using the DHL for WooCommerce plugin. Currently the plugin doesn’t support shipping classes in that way, correct.

    We have a filter you could use to force a ‘free’ flag:

    $free_or_discounted = apply_filters('dhlpwc_use_discount_price', $free_or_discounted, $option, $package);

    Probably works best if you apply DHL’s condition rules before discount is applied.

    Otherwise, you could also use the filter to change the finalized price:

    apply_filters('dhlpwc_calculate_price', $price, $free_or_discounted, $option, $package);

    For a more permanent feature upgrade, or in case custom code is not familiar, you could always contact [email protected] to see if this is a feature request we could add. We have an excellent support team to help you out.

    Greetings,
    Shin Ho
    Plugin Development Team
    DHL Parcel Netherlands

    Thread Starter Epicode

    (@egmdev)

    @shindhl Thanks this is very helpful, we’re gonna use the filter to set the pricing.
    Thanks for resolving our issue.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Rule based on Shipping Class not possible’ is closed to new replies.