Title: Usage restriction &#8211; bug report
Last modified: March 19, 2020

---

# Usage restriction – bug report

 *  [George J](https://wordpress.org/support/users/georgejipa/)
 * (@georgejipa)
 * [6 years, 2 months ago](https://wordpress.org/support/topic/usage-restriction-bug-report/)
 * Hello [@md-jahidul-islam](https://wordpress.org/support/users/md-jahidul-islam/),
 * Steps to reproduce the bug:
 * 1. Add a new coupon, go to **Usage restriction**, and add a product to **Products**.
   E.g. “Product A”
    2. Go to your shop and add “Product A” and “Product B” to the
   cart 3. Apply the coupon. After that, the plugin applies the trial to both products/
   subscriptions.
 * Inside WCSC_Trial_Coupon -> before_caculate_cart_total method you should check
   if the $cart_item[‘product_id’] or $cart_item[‘variation_id’] are in the array
   returned by $coupon->get_product_ids() method (when the coupon has product restrictions).
 * —
    George
    -  This topic was modified 6 years, 2 months ago by [George J](https://wordpress.org/support/users/georgejipa/).

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

 *  Plugin Author [Md Jahidul Islam](https://wordpress.org/support/users/md-jahidul-islam/)
 * (@md-jahidul-islam)
 * [6 years, 1 month ago](https://wordpress.org/support/topic/usage-restriction-bug-report/#post-12811276)
 * Hello George,
 * Thank you for reporting bug. I have tried to test the way you said and found 
   that it is working fine with the retraction product. Can you please check if 
   it conflict with other plugins. Or can you send me a screen-cast at [contact@jahid.co](https://wordpress.org/support/topic/usage-restriction-bug-report/contact@jahid.co?output_format=md)
 *  Thread Starter [George J](https://wordpress.org/support/users/georgejipa/)
 * (@georgejipa)
 * [6 years ago](https://wordpress.org/support/topic/usage-restriction-bug-report/#post-12814167)
 * Hello,
 * I solved the bug before reporting it here (it wasn’t a plugin conflict).
    Anyway,
   if you followed every step and everything worked fine on your end, then you can
   close the ticket.
 * —
    George

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

The topic ‘Usage restriction – bug report’ is closed to new replies.

 * ![](https://ps.w.org/woo-subscription-trial-coupon/assets/icon-256x256.jpg?rev
   =2180006)
 * [Free Trial Coupon for Woocommerce Subscriptions](https://wordpress.org/plugins/woo-subscription-trial-coupon/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/woo-subscription-trial-coupon/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/woo-subscription-trial-coupon/)
 * [Active Topics](https://wordpress.org/support/plugin/woo-subscription-trial-coupon/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/woo-subscription-trial-coupon/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/woo-subscription-trial-coupon/reviews/)

 * 2 replies
 * 2 participants
 * Last reply from: [George J](https://wordpress.org/support/users/georgejipa/)
 * Last activity: [6 years ago](https://wordpress.org/support/topic/usage-restriction-bug-report/#post-12814167)
 * Status: not a support question