• Resolved abhi2112

    (@abhi2112)


    Hello,

    I am facing this error with your plugin. There seems to be a conflict with the coupons and Dokan & i am unable to apply admin created coupons to the final cart.

    I looked into a prvious reply where you had suggested commenting out “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 ); ”

    But i have been unable to find this file.
    Please advice…We will certainly be grateful.

Viewing 1 replies (of 1 total)
  • Hello,

    `We removed the admin coupon to be applied on the cart when Dokan installed because we have thought of the scenarios below:

    Say you are admin and have created a coupon that provides a discount for $40 flat for all your vendor’s products. Some of the vendors may sell products which are $5. So, it is impossible to provide $40 flat discount for a product with $5 cost.
    Another fact is, a vendor might not want to put any discount on his shop’s products, in that case, admin cannot forcefully apply a discount for his products. For products that are very costly, the discount is not an option.

    Now, if you need this feature then kindly paste this line of code on your child-theme functions.php file –

    add_filter( ‘dokan_ensure_vendor_coupon’, ‘__return_false’ );

    Thanks!

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