Title: Hide shipping method using shipping class
Last modified: September 1, 2016

---

# Hide shipping method using shipping class

 *  [Arbex10](https://wordpress.org/support/users/arbex10/)
 * (@arbex10)
 * [9 years, 8 months ago](https://wordpress.org/support/topic/hide-shipping-method-using-shipping-class/)
 * Hello guys,
 * I have to unset a shipping method through a shipping class. If any product in
   the cart has this specific shipping class (slug = a-combinar), I have to unset
   a specific shipping method.
 * Is there an easy way I can do this?
 * Thanks in advance…
 * [https://wordpress.org/plugins/woocommerce/](https://wordpress.org/plugins/woocommerce/)

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

 *  [Caleb Burks](https://wordpress.org/support/users/icaleb/)
 * (@icaleb)
 * Automattic Happiness Engineer
 * [9 years, 8 months ago](https://wordpress.org/support/topic/hide-shipping-method-using-shipping-class/#post-7689967)
 * The [Conditional Shipping and Payments](http://www.woothemes.com/products/woocommerce-conditional-shipping-and-payments/)
   extension can do this.
 * Otherwise, it will take some custom code. You’d need to loop through each product
   in the cart looking for the specific shipping class. If found, you’d then unset
   the shipping method that you need to.
 *  Thread Starter [Arbex10](https://wordpress.org/support/users/arbex10/)
 * (@arbex10)
 * [9 years, 8 months ago](https://wordpress.org/support/topic/hide-shipping-method-using-shipping-class/#post-7689979)
 * Hey Caleb, thanks for your answer!!!
 * I took a look at the extension, and that’s exactly what I need. However, I will
   work with only one condition, so I rather create a custom code to do this, but
   I can’t get this code to work. Can you help me with this?
 *  [Caleb Burks](https://wordpress.org/support/users/icaleb/)
 * (@icaleb)
 * Automattic Happiness Engineer
 * [9 years, 8 months ago](https://wordpress.org/support/topic/hide-shipping-method-using-shipping-class/#post-7690003)
 * It’d be best to use the extension if you can’t code this 🙂
 * Otherwise you’d need to hire a developer, which will likely cost the same as 
   an extension:
 * – [http://jobs.wordpress.net/](http://jobs.wordpress.net/)
    – [https://codeable.io/](https://codeable.io/)

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

The topic ‘Hide shipping method using shipping class’ is closed to new replies.

 * ![](https://ps.w.org/woocommerce/assets/icon.svg?rev=3234504)
 * [WooCommerce](https://wordpress.org/plugins/woocommerce/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/woocommerce/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/woocommerce/)
 * [Active Topics](https://wordpress.org/support/plugin/woocommerce/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/woocommerce/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/woocommerce/reviews/)

 * 3 replies
 * 2 participants
 * Last reply from: [Caleb Burks](https://wordpress.org/support/users/icaleb/)
 * Last activity: [9 years, 8 months ago](https://wordpress.org/support/topic/hide-shipping-method-using-shipping-class/#post-7690003)
 * Status: not resolved