• Resolved e_guardia

    (@e_guardia)


    Hey guys

    Right now I currently have 2 shipping options for my local delivery WooCommerce store. One is Express that delivers within an hour, and the other is Planned in which customers choose a date.

    I want to offer free shipping on orders over $100 and hide the other shipping options when free shipping is available. So I used the code provided by WooCommerce to do this.

    While this did hide the PAID options when FREE was available, it also only shows one FREE shipping option, instead of the two it’s configured for. Everything has been setup with the new 2.6 Zone Shipping.

    In summary, I want to show TWO free shipping options at checkout and hide the paid options. How could I do this?

    Thanks!

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

    (@anphira)

    @e_guardia the code snippet you reference forces there to be only one shipping option returned on the free shipping. So you’d need to remove the break statement and allow it look for more than one free shipping option. However, your other options may have a different method_id. I’d print out all of the options as it goes through them to make sure you have the right if statements.

    Thread Starter e_guardia

    (@e_guardia)

    Hey @anphira

    Thank you for the help. So how could I break the statement and allow it to look for more than one free shipping option? Sorry I don’t know how to code in PHP.

    Also I saw this post on how to get the method_id but I dont where to put the code, could it be in the functinons.php file?

    • This reply was modified 8 years ago by e_guardia.
    Thread Starter e_guardia

    (@e_guardia)

    Found a solution!

    The snippet found here works perfectly if anyone is interested.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘HELP – 2 different free shipping options’ is closed to new replies.