diff --git a/includes/class-wc-discount.php b/includes/class-wc-discount.php new file mode 100644 index 00000000000..49b238af53e --- /dev/null +++ b/includes/class-wc-discount.php @@ -0,0 +1,77 @@ + '', + 'discount' => 0, + ); + + /** + * Coupon ID. + * + * @param string $id + */ + public function set_id( $id ) { + + } + + /** + * Discount amount - either fixed or percentage. + * + * @param string $amount + */ + public function set_amount( $amount ) { + + } + + /** + * Amount of discount this has given in total. + */ + public function set_discount_total() { + + } + + /** + * Array of negative taxes. + */ + public function set_taxes() { + + } + + /** + * Calculates the amount of negative tax to apply for this discount, since + * discounts are applied before tax. + * + * For percent discounts this is simply a percent of each cart item's tax. + * + * For fixed discounts, the taxes are calculated proportionally so the + * discount is fairly split between items. + * + * @return [type] [description] + */ + public function calculate_negative_taxes() { + + } + +}