PluginProbe
Discount Rules for WooCommerce – Disco | Dynamic Pricing, Conditions, Bulk, Bundle, BOGO / 1.4.17
Discount Rules for WooCommerce – Disco | Dynamic Pricing, Conditions, Bulk, Bundle, BOGO v1.4.17
1.4.17 1.4.16 1.4.15 1.4.14 1.4.13 1.4.12 1.4.11 1.4.10 1.4.9 1.4.8 1.4.7 1.4.6 1.4.5 1.4.4 1.4.3 1.4.2 1.4.1 1.4.0 1.3.54 1.3.53 1.3.52 1.3.51 1.3.50 1.3.49 1.3.48 All 180 releases
← All changes | app/Calc/CalcPercentPerProduct.php +2 -2 1.4.131.4.17 View file →
@@ -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.