apply_filters( 'woocommerce_coupon_get_discount_amount' )

This is the most complex discount – we need to divide the discount between rows based on their price in.


Description Description

proportion to the subtotal. This is so rows with different tax rates get a fair discount, and so rows. with no price (free) don’t get discounted.

Get item discount by dividing item cost by subtotal to get a %.

Uses price inc tax if prices include tax to work around https://github.com/woocommerce/woocommerce/issues/7669 and https://github.com/woocommerce/woocommerce/issues/8074.


Source Source

File: includes/class-wc-coupon.php



Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.