Title: How to exclude subscriptions
Last modified: November 28, 2018

---

# How to exclude subscriptions

 *  [ginjoewp](https://wordpress.org/support/users/ginjoewp/)
 * (@ginjoewp)
 * [7 years, 10 months ago](https://wordpress.org/support/topic/how-to-exclude-subscriptions/)
 * Hey Scott,
    Thx for this good work. I wonder how we can exclude product subscriptions
   from subscriber discounts. I reviewed the code of your plugin but didn’t find
   an approach to create a filter. Any hints? Thx in advance, Joe

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

 *  Plugin Author [Scott DeLuzio](https://wordpress.org/support/users/scottdeluzio/)
 * (@scottdeluzio)
 * [7 years, 10 months ago](https://wordpress.org/support/topic/how-to-exclude-subscriptions/#post-10926781)
 * Hi Joe,
    As far as I know WooCommerce coupons doesn’t allow for a wholesale exclusion
   of subscription products. It is possible to exclude specific products, which 
   could be a list of all of your subscription products. To do this, you’re right,
   I’d need to add a filter or some additional settings to the plugin. I’m going
   to push out an update with a new filter that will let you modify the existing
   parameters that are passed to the function that creates the discount code. Then,
   I _think_ you should be able to just add a `exclude_product_ids` array in your
   own function. Something like this:
 *     ```
       add_filter( 'sdwoo_discount_args', 'your_function' );
       function your_function( $discount_args ){
           $discount_args['exclude_product_ids'] = array( 1, 2, 3, 4, 5 );
           return $discount_args;
       }
       ```
   
 * Replace the 1, 2, 3, 4, 5 with a comma separated list of your subscription product
   IDs and that should do what you’re looking for.
    Version 1.3 should be out shortly.
   Let me know if you need anything else.
 *  Thread Starter [ginjoewp](https://wordpress.org/support/users/ginjoewp/)
 * (@ginjoewp)
 * [7 years, 10 months ago](https://wordpress.org/support/topic/how-to-exclude-subscriptions/#post-10935474)
 * Hey Scott,
 * Thank you very much for your fast reply.
    The filter works in calculating the
   correct price. But the error message doesn’t appear. So the customer sees the
   discount of e.g. 5€, and the real price without discount at the bottom of the
   checkout.
 * Your snippet looks as if it has to work, but maybe sth went wrong with product
   variations combined with the subscriptions. We already have had issues with WooCommerce
   subscriptions, so I should come back to you when that task is resolved.
 * Thanks,
    Joe
 *  Plugin Author [Scott DeLuzio](https://wordpress.org/support/users/scottdeluzio/)
 * (@scottdeluzio)
 * [7 years, 10 months ago](https://wordpress.org/support/topic/how-to-exclude-subscriptions/#post-10935502)
 * Can you check the coupon that was created to see if the products were excluded
   correctly?
    [See the Exclude Products section here](https://docs.woocommerce.com/document/coupon-management/#section-3).
   If the correct product(s) are in the coupon settings, then there might be a conflict
   with another plugin. You can try manually creating a coupon with the same settings
   as the one this plugin created to see if there is any difference in the behavior
   at checkout.

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

 The topic ‘How to exclude subscriptions’ is closed to new replies.

 * ![](https://ps.w.org/subscriber-discounts-for-woocommerce/assets/icon-256x256.
   png?rev=1695892)
 * [Subscriber Discounts for WooCommerce](https://wordpress.org/plugins/subscriber-discounts-for-woocommerce/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/subscriber-discounts-for-woocommerce/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/subscriber-discounts-for-woocommerce/)
 * [Active Topics](https://wordpress.org/support/plugin/subscriber-discounts-for-woocommerce/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/subscriber-discounts-for-woocommerce/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/subscriber-discounts-for-woocommerce/reviews/)

 * 3 replies
 * 2 participants
 * Last reply from: [Scott DeLuzio](https://wordpress.org/support/users/scottdeluzio/)
 * Last activity: [7 years, 10 months ago](https://wordpress.org/support/topic/how-to-exclude-subscriptions/#post-10935502)
 * Status: not resolved