• Resolved jarrydpaton44

    (@jarrydpaton44)


    I’m trying to set up coupons on this website but keep getting this error.

    I’ve tried the code add_filter( ‘dokan_ensure_vendor_coupon’, ‘__return_false’ );
    Which I’ve added to my themes functions.php file. This did not fix the issue.

    I’ve seen another about adding code to a file in Dokan-Lite. My version doesn’t have this file. – open dokan-lite/includes/class-order-manager.php file and comment out this line – add_filter( ‘woocommerce_coupon_is_valid’, array( $this, ‘ensure_vendor_coupon’ ), 10, 3 );

    class-order-manager.php doesn’t exist.

    What do I need to do to add get the coupon working?

    The page I need help with: [log in to see the link]

Viewing 5 replies - 1 through 5 (of 5 total)
  • I have the same problem.

    Hello @jarrydpaton44 & @nemoprofeta,

    I have just checked and if I insert the code add_filter( ‘dokan_ensure_vendor_coupon’, ‘__return_false’ );
    on my child-themefunctions.php` then the admin coupon works fine. So, please make sure that you have placed the code correctly. If yes and still not working then would you please contact our own support forum so that we can debug and solve your problem?

    Cheers!

    • This reply was modified 4 years, 2 months ago by Nazmul Hassan.
    Thread Starter jarrydpaton44

    (@jarrydpaton44)

    Hey Nazmul,
    My client doesn’t have a child theme running. So I have added the code directly to their functions.php file inside their theme folder.

    The theme is called Rehub Theme.

    Does it requite a child theme to work? which shouldn’t be ?

    Hello @jarrydpaton44 ,

    It is not required to have a child theme but it’s good practice because if you update your theme in the future these changes will be gone. To avoid that, we recommend to put any changes through a child theme.

    Thank you ??

    Thread Starter jarrydpaton44

    (@jarrydpaton44)

    Hey Rashed,
    Thanks for that. I was just thinking it may of caused an issue with the code needed to be inserted.

    I have just submitted a ticket to your official forum – Hopefully can get it sorted ASAP.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘A coupon must be restricted with a vendor product.’ is closed to new replies.