How to Hide Woocommerce Shipping Methods with Shipping Classes?

How to Hide Woocommerce Shipping Methods with Shipping Classes?

5,447 Просмотров

Ссылки и html тэги не поддерживаются


Комментарии:

@RAFIQULISLAM-917
@RAFIQULISLAM-917 - 05.08.2024 06:07

Very Impressive Video. Keep up the good work. But my question is- where would I get these sample code from?

Ответить
@PTBPCarson
@PTBPCarson - 01.08.2024 01:39

Thank you! I been struggling for weeks over this. Subscribed and liked )

Ответить
@ingarnt
@ingarnt - 05.04.2024 12:02

Big thanks! Works like a charm for one of my two use-cases.

However, I am not a PHP expert. I also need a slight variation on this. I need to hide a shipping method if there are no 'heavy' shipping-class products in the cart. Or the logic could be if there are ONLY 'light' shipping-class products in the cart, then hide Flat_rate:2, flat_rate:5 and flat_rate:7

i.e.

If no pallet items (shipping-class 'heavy') in cart, then remove Pallet shipping-method

Ответить
@banatcollections527
@banatcollections527 - 24.11.2023 18:03

how to remove shipping address down of delivery charge in cart page.

Ответить
@lissettetalhouk4436
@lissettetalhouk4436 - 21.08.2023 02:59

Hello!!!!! Thanks for the video, how can I delete only the shipping methods at checkout? and only that it appears in the cart, thank you, I just need the shipment to appear in the checkout that was selected by the customer in the shopping cart, thank you

Ответить
@oceanwired
@oceanwired - 26.07.2023 19:50

How to disable checkout or "add to cart" by shipping class?

Ответить
@Pororos
@Pororos - 01.07.2023 01:58

Thank you! Anything similar to notify a customer they have an "exclusive product" which can only be paid using a defined payment server, so they must pay it as is or remove the product to allow all the payment methods?

Ответить
@I-rshad
@I-rshad - 09.06.2023 07:22

Sir can you help me with the code for showing paid shipping option when both the free shipping and paid shipping items comes for checkout.

1-hide free shipping for shipping class with 20$ shipping cost

2-hide this $20 shipping class option for the free shipping items

Now when both of the thing comes sametime in cart showing no shipping options available

Ответить
@TheyCallMeRome
@TheyCallMeRome - 17.04.2023 16:36

great tutorial, but when you don't have the class in the cart, example local courier-only, then its still showing the courier-only method

Ответить
@dsuinfotech
@dsuinfotech - 01.04.2023 20:12

Hello how I can achieve below requirement?

I want to sell my product in all countries with weight based shipping cost.

If buyer from US shipping cost will be apply as upto 250gm weight $50 and there after if user add any weight product in cart charges will be apply as $10 1-250gm &

Means for 350gm charges will be $60
For 550gm $70

Your help will be aplricated. Thank you

Ответить
@qariasim
@qariasim - 16.03.2023 13:21

you're brilliant 😊it worked perfectly for two classes, one with "Free Shipping only" and the other one with either "Flat rate" or "Cash on delivery". But when two items from different classes are added to cart, it says: No shipping options were found for. I've tried all codes with no luck. Please help!

Ответить
@161633232
@161633232 - 09.09.2022 03:27

Excellent tutorial! Thanks a lot. It worked fine for me :)

Ответить
@dadadada-of8bj
@dadadada-of8bj - 11.08.2022 19:29

Thank you! It's the first time I try to use code snippets and I followed the lines and added a couple of the snippets, and they work like a magic.

Ответить
@timbrazeal4751
@timbrazeal4751 - 28.04.2022 10:12

You're brilliant

Ответить
@RohitChourasia
@RohitChourasia - 22.04.2022 02:30

Hi, Great video. Your code also works like a charm! However I have 12 shipping zones which have 12 shipping methods (with different slugs) to be hidden for just 1 Shipping Class. So do I have to paste this code 12 times under each other? OR do I have to create 12 different snippets altogether? Hope you can help me on this.

Ответить
@mohammadal-najjar5115
@mohammadal-najjar5115 - 08.02.2022 04:38

Hi is there any update in woocommerce that made this snipt of code is not working because I tried so much but it did not work

Ответить
@Jabro111
@Jabro111 - 04.11.2021 18:05

Thank You 😉I's works, but but only to hide method for one shipping class :/ how to change the code to hide one shipping method for multiple classes? For example - shipping methos 1 works only for 1kg un 3 kg shipping class, but doesn't works for 5kg, 10kg and 20kg shipping classes? Please help :)

Ответить
@jeremylhomme7581
@jeremylhomme7581 - 24.09.2021 14:38

Big thanks to you man!! It works like a charm

Ответить
@SoftExpert1
@SoftExpert1 - 14.09.2021 13:19

Hi, I am delivering products to a specific area "Victoria Australia'. I want to have the shipping and calculation but also want to hide the 'ship to another address' checkbox along with its fields.

Ответить
@datboyfemi
@datboyfemi - 14.09.2021 13:02

Greetings from Nigeria

Ответить