Skip to content

Instantly share code, notes, and snippets.

@jordantrizz
Last active December 20, 2019 03:07
Show Gist options
  • Save jordantrizz/fd058cca6f2c832e4776392348a00aed to your computer and use it in GitHub Desktop.
Save jordantrizz/fd058cca6f2c832e4776392348a00aed to your computer and use it in GitHub Desktop.
Patch File for Including Taxes in Booster for WooCommerce Minimum Orders
--- booster-plus-for-woocommerce/includes/class-wcj-order-min-amount.php 2019-12-12 19:27:10.073916633 +0000
+++ booster-plus-for-woocommerce/includes/class-wcj-order-min-amount.php 2019-12-20 02:41:28.750399681 +0000
@@ -105,7 +105,8 @@
if ( 'yes' === get_option( 'wcj_order_minimum_amount_exclude_shipping', 'no' ) ) {
$shipping_total = isset( WC()->cart->shipping_total ) ? WC()->cart->shipping_total : 0;
$shipping_tax_total = isset( WC()->cart->shipping_tax_total ) ? WC()->cart->shipping_tax_total : 0;
- $cart_total -= ( $shipping_total + $shipping_tax_total );
+ $tax_total = isset( WC()->cart->tax_total ) ? WC()->cart->tax_total : 0;
+ $cart_total -= ( $shipping_total + $shipping_tax_total + $tax_total);
}
if ( 'yes' === get_option( 'wcj_order_minimum_amount_exclude_discounts', 'no' ) ) {
$cart_total += ( WC()->cart->get_cart_discount_total() + WC()->cart->get_cart_discount_tax_total() );
@jordantrizz
Copy link
Author

Updated to version 4.6.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment