Disable Coupon’s on Offered Price

Top WooCommerce & WordPress Plugins Forums Price Offers for WooCommerce Disable Coupon’s on Offered Price

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #136410
    ashley.lloyd
    Participant

    Hello there

    We’ve been using the free version of the plugin and it’s been amazing. We sell a huge range of jewellery and the offer functionality has really helped streamline the negotiating process that some customers insist on.

    The only issue I’ve noticed today is when a customer makes and offer and we accept/counter the offer, coupon’s are still able to be used at checkout. This almost defeats the purpose of accepting an offer as they can further reduce our lowest price depending on the coupon they use.

    I have had a look through coupons, WooCommerce and Price Offer but can’t seem to find anything on this at all. I’m not sure if there is a work around, some additional functionality I’m missing or is offer’s can update the sale price, rather than the regular price to counter this.

    Any help would be much appriviated.

    Many thanks

    #136571
    Moshtafizur
    Moderator
    Plugin Support

    Hi there,

    We apologize for any inconvenience you may be experiencing.

    I have passed your request to the development team. They will back to you as soon as possible.

    Kind regards.

    #136605
    Tom Anbinder
    Moderator
    Plugin Support

    Hi, Ashley,

    Thank you for pointing it out. We will address this in the next plugin version. Meanwhile, if you are ok with adding a small PHP snippet to your site, I think this should solve our problem:

    add_filter( 'woocommerce_coupon_get_discount_amount', function ( $discount, $discounting_amount, $cart_item, $single, $coupon ) {
        return ( ! empty( $cart_item['alg_wc_price_offer_id'] ) ? 0 : $discount );
    }, 10, 5 );

    Please give it a try and let me know what you think.

    #136632
    ashley.lloyd
    Participant

    Hello Tom

    Thank you for getting back to me.

    I’ve tested this in several ways and it works perfectly!

    It disables any coupon for the product which has been accepted/countered as an offer and when adding another item to the cart, the item which hasn’t previously had an offer is discounted by the coupon and the offered product isn’t affected.

    As everything we sell is one-off jewellery pieces and we have offers set for minimum pricing, this now allows us to accept offers for higher-end items and customers can combine cheaper products with generic discounts.

    #137718
    Tom Anbinder
    Moderator
    Plugin Support

    Hi, Ashley,

    Sorry for not getting back to you sooner.

    Happy to hear it’s solved 🙂 Please let me know if you need anything else.

    P.S. Since the plugin v2.8.0, it’s possible to achieve what we need without a custom code. There is a new “Exclude price offers from coupons” checkbox option in “WooCommerce > Settings > Price Offers > General > Advanced Options” – it’s enabled by default.

    P.P.S. If you like the plugin, please consider leaving me a rating.

Viewing 5 posts - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.