Action/Filter to adjust coupon amount to be redeemed
-
Hi there,
we develop the plugin WooCommerce for Germanized. Our plugin adds support for the legal requirements of the German Market.
One such special thing are vouchers – they need to be taxed differently (based on the amount before applying the discount). That’s why Germanized adds a custom option to coupons (vouchers/Wertgutscheine). This feature will add a negative fee instead of the actual discount to the cart to support improved taxation.
That doesn’t seem to work with your plugin which tries to determine the actual discount amount on a per coupon base to reduce the coupon amount left for the buyer to redeem. We’d like to add a compatibility and adjust the discount amount but there is currently no hook/filter available in your plugin to do so. Could you add a filter to adjust the discount amount + tax dynamically?
Specifically in:
Woocommerce_Gift_Cards_Lite_Public::wps_wgm_woocommerce_new_order_item()
e.g.:
$wps_wgm_discount = apply_filters( 'wps_wgm_item_discount', $item->get_discount(), $item, $order, $the_coupon ); $wps_wgm_discount_tax = apply_filters( 'wps_wgm_item_discount_tax', $item->get_discount_tax(), $item, $order, $the_coupon );
Thanks,
Dennis
- The topic ‘Action/Filter to adjust coupon amount to be redeemed’ is closed to new replies.