• Resolved bravewhale

    (@bravewhale)


    Hello,

    I’ve seen other support requests on needing a woocommerce coupon created by an admin user, and the response has been to comment out this line of code inside the Dokan plugin:

    add_filter( 'woocommerce_coupon_is_valid', array( $this, 'ensure_vendor_coupon' ), 10, 3 );

    However, I do not want to edit the plugin code, as this will be overwritten when there is another update.

    Can you please tell me if and how I can write a function to add to my theme that will hook into Dokan and disable this coupon restriction?

    OR is there a new option to allow Woocommerce coupons while Dokan is active?

Viewing 2 replies - 1 through 2 (of 2 total)
  • Hello @bravewhale,

    If you need this feature then please put the below code on your child theme’s function.php.

    add_filter( 'dokan_ensure_vendor_coupon', '__return_false' );

    In case it is not working let us know. We will help you with a way around.

    Regards,

    Thread Starter bravewhale

    (@bravewhale)

    Thank you! This works.

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

The topic ‘How to allow admin coupons without editing Dokan plugin?’ is closed to new replies.