2 comments
  1. Eoin Profile Pic

    Hi,
    Using the coupon method – I have a problem that I wish it only to apply to one [product – but if there are also other products are in the cart – the coupon is allowing that free shipping as well.

    The scenario is: I have a product “A” and to promote it I have a woocommerce coupon called “FREE” and when a customer uses it – they get free shipping. BUT the problem is – if another product is in the cart = product “B” – that also gets free shipping.

    I need woocommerce to only allow the code when product “A” is in the cart.

    Any help much appreciated.

    Thanks.

  2. Robert Ross Profile Pic

    This snippet of code effectively hides other shipping methods when “free” is available. I am having a hard time figuring out how to hide *one specific* method only (I suppose in lieu of “foreach”). Here is my use case:
    Normally there are two options:

    LOCAL PICKUP (free)
    DELIVERY $5

    … If a customer’s Cart reaches a certain threshold I’d like the options to be:

    LOCAL PICKUP (free)
    DELIVERY (free)

    … Where the Free has supplanted only teh paid delivery option, not hidden the entirety of other options.

Leave a Comment

Your email address will not be published. Required fields are marked *

Join 1,653,898+ Happy Site Owners Using Astra

Whether you are a beginner, small business owner, or professional web developer, Astra provides all the tools you need to easily build your beautiful WordPress website.

🔥 Extended Cyber Savings: Shop Before It’s Gone!

00
Months
00
Days
00
Hours
00
Minutes
00
Seconds

WAIT!!

You’re Missing the Biggest Discount of the Year!

00
Months
00
Days
00
Hours
00
Minutes
00
Seconds

Grab this rare opportunity to save up to 50%

100% Risk-Free Money Back Guarantee!

REWIND

YEAR IN REVIEW

Download is Just A Click Away!

Membership Retention Checklist Download

Download is Just A Click Away!

Enter your email address and be the first to learn about updates and new features.

Download Free Astra Theme - Modal Popup Form
Scroll to Top