×

Hook to exclude shipping class

Home WPAli Support Forums Shipping Rate by Distance Hook to exclude shipping class

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #8882
    surikataki
    Participant

    Hello,

    I have just bought your plugin and I am very happy with this! It’s simple and it does what I wanted 🙂 However, I was wondering if there is any hook function to exclude one shipping class or category or something specific?

    Thank you in advance

    #8884
    surikataki
    Participant

    I saw in the changelog that you’ve added some hooks to control more stuff.

    
    1.0.6 = 03/10/2019
    *  replaced the filter 'wpali_control_add_distance_shipping_rate' with 'wpali_add_distance_shipping_rate' and added more action hooks ( 'wpali_before_add_shipping_rate', 'wpali_after_add_shipping_rate', 'wpali_shipping_rate_not_added', 'wpali_before_no_shipping_message' )
    

    However, there is not any documentation/instructions on how to use them? Could you please provide some extra info? I can give you my licence key if you would like

    Thanks.

    #8890
    Ali Khallad
    Keymaster

    Hello, this is the hook that you need to use: wpali_add_distance_shipping_rate

    It’s a filter with single parameter ($rate), you need to return false if your condition is met, this way the rate won’t be applied if the condition is met ( shipping class exists )

    #8906
    surikataki
    Participant

    Hello,

    Thank you for your reply! Great I will try that and if I have any other issues, I will get back to you!

    #8908
    Ali Khallad
    Keymaster

    Happy to help

Viewing 5 posts - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.