Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion includes/abstracts/class-sst-abstract-cart.php
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,8 @@ public function __construct() {
*/
public function filter_excise_tax_tic( $tic, $fee ) {
$id = is_object( $fee ) && isset( $fee->id ) ? $fee->id : ( is_string( $fee ) ? $fee : '' );
if ( $id === 'co-excise-tax' || $id === 'CO EXCISE TAX' ) {
$name = is_object( $fee ) && isset( $fee->name ) ? $fee->name : '';
if ( $id === 'co-excise-tax' || $id === 'CO EXCISE TAX' || $name === 'CO EXCISE TAX' ) {
return 99990;
}
return $tic;
Expand Down Expand Up @@ -112,6 +113,13 @@ public function calculate_taxes() {
);
break;
case 'fee':
// Don't apply tax to CO EXCISE TAX fee - it's a tax itself
$fee_id = isset( $item['id'] ) ? $item['id'] : '';
if ( $fee_id === 'co-excise-tax' || $fee_id === 'CO EXCISE TAX' ) {
// Skip setting tax on excise tax fee - TaxCloud may return tax for it
// but we don't want to charge tax on a tax
break;
}
$this->set_fee_tax(
$item['cart_id'],
$tax_total
Expand Down
Loading