Repository › Forums › Support › WooCommerce Extended Coupon Features PRO › WooCommerce Subscriptions not auto-applying recurring % discount
- This topic has 8 replies, 2 voices, and was last updated 5 years, 5 months ago by Soft79.
-
AuthorPosts
-
June 11, 2018 at 4:22 pm #3367jerryParticipant
Hello,
I’m using the pro version of your plugin with Woo Subscriptions. My goal is to give subscribers a discount upon signup and then a separate discount each month based on user role (manually set).It seems that the Recurring Product % Discount is not being applied when subscription auto-renews in recurring orders (purchase 2, 3, … etc.). I have a Customer Restriction set in your plugin as “Allowed User Roles” with the scenario “if a user is a Tier 1 user, they should get a certain % discount each month their subscription renews.”
Any insight on this? Thank you!
June 12, 2018 at 4:09 pm #3377Soft79KeymasterI’m not sure. I don’t have the subscriptions plugin. Can you please temporarily enable debug mode (Settings > WooCommerce Extended Coupon Features > Debug Mode) and send me the coupon data as json (See miscellaneous tab while debug mode is enabled)?
June 13, 2018 at 12:37 pm #3390jerryParticipantHello and thanks for the reply.
Again, my scenario is that I have a “Percentage Discount” automatic coupon that gives customers 10% off any purchase of an “Autoship” category product (which is a subscription product). This is working well. When a customer purchases the subscription, their user role automatically changes to a “Tier 1” user.I then have another “Recurring Product % Discount” automatic coupon that is supposed to apply to all orders of an “Autoship” category product with another restriction of “Allowed User Roles” = Tier 1 user. My problem is the system doesn’t automatically apply the coupon to the first auto-shipment for the Tier 1 customer. That is, it doesn’t apply the coupon to the subscription. Not sure if there’s an error or my setup is incorrect.
I’m using your priority feature since these are both “Individual Use Only” coupons, the first has priority 1 and the second has priority 4.
Here’s the debug data: Thank you!
{“result”:”ok”,”coupons”:{“coupon_id”:1084,”coupon_code”:”dsc-autoship-tier1″,”meta”:{“_edit_last”:””,”_edit_lock”:””,”_used_by”:””,”_wjecf_allow_cart_excluded”:”no”,”_wjecf_allow_enqueue”:”yes”,”_wjecf_apply_discount_to”:”all”,”_wjecf_apply_silently”:”no”,”_wjecf_bogo_matching_products”:”no”,”_wjecf_categories_and”:”no”,”_wjecf_coupon_priority”:”4″,”_wjecf_custom_fields_and”:”no”,”_wjecf_customer_roles”:[“autoship_member_tier_1″],”_wjecf_first_purchase_only”:”no”,”_wjecf_is_auto_coupon”:”yes”,”_wjecf_multiply_free_products”:”no”,”_wjecf_must_select_free_product”:”no”,”_wjecf_products_and”:”no”,”_wjecf_select_free_product_message”:”Please choose your free gift:”,”coupon_amount”:””,”css_selector_at_pages_selected”:””,”customer_email”:””,”date_expires”:null,”discount_type”:”recurring_percent”,”exclude_product_categories”:””,”exclude_product_ids”:””,”exclude_sale_items”:false,”expiry_date”:””,”free_shipping”:false,”individual_use”:true,”limit_usage_to_x_items”:null,”maximum_amount”:””,”minimum_amount”:””,”overlay_automatictrigger_disablemobile”:”0″,”post_do_customizeclosebtn”:”0″,”post_do_hideclosebtn”:”0″,”post_do_preventscroll”:”0″,”post_enableurltrigger”:”0″,”product_categories”:[131],”product_ids”:[],”usage_count”:2,”usage_limit”:0,”usage_limit_per_user”:0}}}
June 13, 2018 at 1:35 pm #3391Soft79KeymasterI think it’s because the Subscriptions-plugin defines it’s own discount type (recurring_percent) which our plugin doesn’t know.
Try this snippet in your functions.php:
add_filter( 'wjecf_coupon_has_a_value', function() { return true; } );
June 13, 2018 at 5:20 pm #3393jerryParticipantOk, I’ll try that code and thank you.
Also, when I go to manually add a coupon to a subscription I get a dialog box error that says “Sorry, it seems the coupon “dsc-autoship-tier1″ is not yours.” when it is definitely a coupon under “Mine” at the top of the coupons page.Any chance that’s related to your plugin or is that Woo?
Thanks again,
June 13, 2018 at 5:49 pm #3394Soft79KeymasterDo you have the role ‘autoship_member_tier_1’ ?
June 13, 2018 at 5:55 pm #3395jerryParticipantI’m an Administrator, do I need to add that role ‘autoship_member_tier_1’?
June 13, 2018 at 5:59 pm #3396jerryParticipantI tried adding that additional role to myself and it did work. Seems unnecessary but it worked.
June 13, 2018 at 8:40 pm #3397Soft79KeymasterThe coupon is limited to that role, so it makes sense that it’s required.
-
AuthorPosts
- You must be logged in to reply to this topic.