You should get the subtotal like this:
global $woocommerce;
$cart_subtotal = $woocommerce->cart->get_cart_subtotal();
From here. So you will can do something like this:
add_filter( 'woocommerce_product_tax_class', 'big_apple_get_tax_class', 1, 2 );
function big_apple_get_tax_class( $tax_class, $product ) {
global $woocommerce;
$cart_subtotal = $woocommerce->cart->get_cart_subtotal();
if ( $cart_subtotal <= 110 )
$tax_class="Zero Rate";
return $tax_class;
}
Related Posts:
- Show only geolocated user country into Woocommerce checkout country fields
- Reverse engineering of WooCommerce Storefront filters
- How to modify “[Product] has been added to your cart” in WooCommerce?
- WordPress codex: apply_filters – clarification on creating a new hook on the fly. How do we use it?
- Is there a Woocommerce hook that fires when applying a coupon but before checking if it’s valid?
- Filter on a custom product attribute in WooCommerce using meta_query or tax_query [closed]
- Rewriting Woocommerce Product Filters To URL Segments
- What is the action hook for an order that fails on frontend checkout in WooCommerce?
- woocommerce_get_price filter hook not working for product variation price
- Accessing parameters when adding filter
- Using a filter with multiple parameters and $this
- Remove add to cart icon/view product button woocommerce
- Separeting product from post in search result
- Woocommerce get billing state manually
- Redirect customer to login page (with other signup plugin) if user not logged in when proceeding to checkout
- Woocommerce: Complex query in pre_get_posts [closed]
- Using a filter to change a path
- Pre filter woocommerce products to remove a certain category of products
- How to apply these filters
- How to add order status class to the body tag?
- Redirect no product url’s to static url
- What Hook/Action is performed when a field in checkout form is changed in WooCommerce
- How can I remove a WooCommerce Product Tab’s sub section in wp-admin?
- How do I create a filter to hide the One Click Accessibility plugin button in WordPress?
- manage_shop_order_posts_custom_column() hook is Not working In Functions.php file in my WordPress active theme
- Display custom product option in admin order details
- How to create a WooCommerce Product filter based on PHP foreach
- Woocommerce : Add name filed of checkout page to buyers wordpress display name
- Two Filter Issue [closed]
- apply_filter and add_filter conflict
- Woocommerce – Hide shipping at all, if only certain product or products with certain shipping class is in the cart
- Running JavaScript after using WooCommerce Filter Plugin
- Redirecting orders by company field
- Combine one action and one filter
- I’m getting error Ultimate WooCommerce Filters
- How to add woocommerce product price filter widget to other page
- How can i add product Accessories from front-end using custom php form?
- How to change lost password email text using custom plugin wordpress?
- Overriding Plugin function in your child theme
- Update / refresh mini cart, after custom AJAX add_to_cart event
- Filter orders in Admin area based on logged in user
- Add suffix to price html does not work
- woocommerce price filter not working when change currency
- With what hook do I remove WooCommerce existing Product Data Tab form fields?
- AffiliateWP not calculating multiple quantities when using affwp_calc_referral_amount filter
- Add second price option based on payment method at cart item price
- How to get the attributes based on dependency in woocommerce?
- Reposition variation stock message
- Add custom ID to WooCommerce product tab
- get woocommerce My account page link
- Where do the cart details are stored in database?
- Fetch Product information in WooCommerce
- Add Custom CSS to Woocommerce Product Page in a specified category
- In WooCommerce filter the available Payment Methods by User Role [closed]
- wc_get_product in a none woocommerce page
- WooCommerce shipping – Different product different shipping? [closed]
- Remove action added through function
- Filter get_adjacent_post to follow woocommerce product category
- Displaying Custom Input Value to Customer Order Details (My Account) page in Woocommerce
- Add custom order meta to Order Completed email
- How to upload Woocommerce product images via API? [closed]
- how to do a processing Orders into Complete after x Minutes or x hour in WooCommerce [closed]
- show content of a page built using yootheme builder on different page/template
- Tax Query for custom Taxonomy field
- Improve WooCommerce checkout process [closed]
- How can I put the contents of My Account > Order into a separate page, Woocommerce
- Adaptive product filters for WooCommerce
- Feed format for woocommerce [closed]
- WooCommerce Hook: Content get’s displayed twice and not AFTER the order total
- Have I got this IF Statement correct?
- WooCommerce Price Filter not working? [closed]
- Adding Field in WooCommerce
- Woocommerce Sort by default variation price
- Add Name and SKU Main Product to Secondary Product to Cart
- Add rewrite rule to make Woocommerce product category page seo friendly
- add the attribute value above the english product title
- How to add woocommerce products header title in woocommerce_breadcrumb hook to function.php
- Format decimals of get_price_html
- Getting in an exception for get product detail by id in woocommerce REST api
- Temporary access to page with URL sent to email
- How do you programatically add a booking item to the cart?
- populating extra field with woocommerce categories
- add_filter not works in ajax
- How to skip woocommerce checkout after payment page? [closed]
- Product thumbnail size in catalog
- how can i import the csv file in wordpress woocommerce.?
- Change wp-login.php? Problem with .htaccess password protection and multi user shop
- Conditional email recipient based off Shipping Method [closed]
- Show pop up message for specific categoryies
- How to add custom checkout field in user details mail template
- Custom product loop avoiding duplicates
- How to show detailed order history on woocommerce product page [closed]
- Fetch products with filter by similar categories at same time
- Trying query woocommerce product order by menu order and stock status
- editing product page template – getting template for related products not working
- Woocommerce | I want to the button ‘Add to Cart’ on the (all) product-page changed by just ‘open product’ button
- Adding line breaks in WooCommerce order processing emails
- Woocommerce backend sorting product drag drop by menu_order to date
- Save customer email via WPForms on checkbox marking when placing the Woocommerce order
- Issues with WooCommerce: jquery.blockUI.min.js