Hello,
I’m new setting up my first woocommerce store with the Vantage theme, and am trying to figure out the woocommerce shipping. I have two shipping classes for oversized items (Oversize1 and oversize2). I have them working in the shopping cart, but our Free Shippiing option for any products over $50. is also showing up in the cart. How can I hide the Free Shipping Option when Shipping Classes are present? Is there a CSS code, or shipping code I could insert somewhere to fix this? Any help greatly appreciated.
Thank you.
Tony
Hi Tony,
This is possible, but you’ll need to use PHP to do this. This article contains code that will allow you to do this but there’s a little bit of setup required to get it working.
If you’re not using a child theme already, I would recommend adding the code through the excellent Code Snippets plugin instead.
Okay. I looked at the link you referred to. If I add this code to my CSS snippet will it then work? Also Do I add this entire code, or just parts of it?
Hi Tony,
That’s not CSS, that’s PHP (ones a programming language that’s run server side and the other is a style sheet language – basically client side presentation) so no, you cannot add that to your custom CSS. Sorry mate. :(
I would recommend giving that entire article a read as you will need to make a minor edit to the above PHP to get it working for your website.
Is their a CSS code I could use instead? The PHP method is fairly involved. I would think this would be an option built in, but apparently not. Anyway I’m hoping this may be possible with CSS?
Hi Tony,
I might be able to hide it with CSS, but honestly, I wouldn’t recommend it’ll still be selectable, just not visible (this means it could be easily abused if someone found out). Do you have a public URL where we can take a look at your setup?
Sadly, the only truly reliable method is to use the PHP.