| @@ -90,9 +90,9 @@ | ||
| 90 | 90 | $forced = max( 0, (int) $this->item['disco_forced_qty'] ); |
| 91 | 91 | $product_discount = $price ? $price * $discount_value / 100 : 0; |
| 92 | 92 | $this->discounted_quantities = $forced; |
| 93 | 93 | |
| 94 | - return $forced * $product_discount; | |
| 94 | + return apply_filters( 'disco_final_discounted_amount', $forced * $product_discount, 'percent_per_product' ); | |
| 95 | 95 | } |
| 96 | 96 | $min = $this->rule['min'] ? (int) $this->rule['min'] : 0; //phpcs:ignore |
| 97 | 97 | $max = ! empty( $this->rule['max'] ) ? (int) $this->rule['max'] : ( $this->discount_intent === 'Bulk' ? PHP_INT_MAX : 0 ); // phpcs:ignore |
| 98 | 98 | $recursive = ! empty( $this->rule['recursive'] ) && $this->rule['recursive'] === 'yes'; // phpcs:ignore |
| @@ -150,9 +150,9 @@ | ||
| 150 | 150 | } |
| 151 | 151 | |
| 152 | 152 | $this->discounted_quantities = $discount_for_quantities; |
| 153 | 153 | |
| 154 | - return $discount_amount; | |
| 154 | + return apply_filters( 'disco_final_discounted_amount', $discount_amount, 'percent_per_product' ); | |
| 155 | 155 | } |
| 156 | 156 | |
| 157 | 157 | /** |
| 158 | 158 | * Calculate Price. |