Title: check for coupon code
Last modified: August 30, 2016

---

# check for coupon code

 *  [khorne049](https://wordpress.org/support/users/khorne049/)
 * (@khorne049)
 * [10 years, 6 months ago](https://wordpress.org/support/topic/check-for-coupon-code/)
 * Is there a way to check to see if coupon code is applied and remove the free 
   gift? everything I code tends to break the plugin by messing up the css and not
   showing any of the products. I have been trying to use a if else statement.
    
   add_action(‘woocommerce_before_cart_table’, ‘apply_product_on_coupon’); function
   apply_product_on_coupon( ) { global $woocommerce;
 *  if( $woocommerce->cart->applied_coupons ) {
    echo ‘No Free product’; } } ?> 
   else do plugin.
 * [https://wordpress.org/plugins/woocommerce-multiple-free-gift/](https://wordpress.org/plugins/woocommerce-multiple-free-gift/)

The topic ‘check for coupon code’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/woocommerce-multiple-free-gift_83694c.
   svg)
 * [WooCommerce Multiple Free Gift](https://wordpress.org/plugins/woocommerce-multiple-free-gift/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/woocommerce-multiple-free-gift/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/woocommerce-multiple-free-gift/)
 * [Active Topics](https://wordpress.org/support/plugin/woocommerce-multiple-free-gift/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/woocommerce-multiple-free-gift/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/woocommerce-multiple-free-gift/reviews/)

 * 0 replies
 * 1 participant
 * Last reply from: [khorne049](https://wordpress.org/support/users/khorne049/)
 * Last activity: [10 years, 6 months ago](https://wordpress.org/support/topic/check-for-coupon-code/)
 * Status: not resolved