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!