0
我正在嘗試添加一個過濾器以吸引商務,該計算基於購物車數量計算稅額,並且僅當物品運送至紐約時,訂單> 110 $不付稅,並且訂單< 110運到紐約州的$ &應支付8,865%的稅。 我發現這個代碼的地方,但不知道如果作品,既不在哪裏使用它。添加Woo商業稅過濾器
add_filter('woocommerce_product_tax_class','big_apple_get_tax_class', 1, 2);
function big_apple_get_tax_class($tax_class, $product) {
if (WC()->cart->subtotal <= 110)
$tax_class = 'Zero Rate';
return $tax_class;
}
Apreciatte any help!