You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

移除WooCommerce购物车税费项的(estimated for Australia)文本

Fix: Remove "(estimated for Australia)" from WooCommerce Cart Tax Label

Hey there! I see you're stuck with that stubborn estimated tax label cluttering up your WooCommerce cart. Let's get this sorted with filter-based solutions tailored exactly to the issue you're facing.

Why This Happens

WooCommerce automatically adds this "(estimated for [Country])" text when it can’t confirm a customer’s full address (like when they haven’t entered shipping details yet). But if you want to hide it no matter what, these filters will do the trick.

Solution 1: Strip the Estimated Text from Tax HTML

This filter targets the full HTML output of the cart tax total and removes the <small> tag containing the unwanted text. Add this code to your active theme's functions.php file (or use a custom code plugin like Code Snippets to avoid losing changes when updating your theme):

// Remove estimated tax label from cart and checkout tax totals
add_filter( 'woocommerce_cart_tax_total', 'strip_estimated_tax_text', 10, 1 );
add_filter( 'woocommerce_checkout_tax_total', 'strip_estimated_tax_text', 10, 1 );

function strip_estimated_tax_text( $tax_html ) {
    // Regex to remove the small tag with estimated text (case-insensitive)
    return preg_replace( '/<small>\(estimated for.*?\)<\/small>/i', '', $tax_html );
}

Solution 2: Customize the Tax Label Directly

If the first solution doesn’t work (depending on your WooCommerce version or theme customizations), try this approach that modifies the tax label itself before it’s rendered:

// Remove estimated text from tax labels on cart/checkout
add_filter( 'woocommerce_tax_label', 'customize_tax_label_remove_estimated', 10, 2 );

function customize_tax_label_remove_estimated( $label, $tax_rate ) {
    // Only apply this change on cart or checkout pages
    if ( is_cart() || is_checkout() ) {
        // Remove the specific estimated text and trim leftover spaces
        $label = trim( str_replace( '(estimated for Australia)', '', $label ) );
    }
    return $label;
}

How to Apply the Fix

  1. Copy either code snippet (start with Solution 1 first)
  2. Go to your WordPress Dashboard → Appearance → Theme File Editor
  3. Select your active theme, then open the functions.php file
  4. Paste the code at the very end of the file
  5. Click "Update File"
  6. Clear your site cache (and browser cache) to see the changes take effect

Both methods will remove the unwanted "(estimated for Australia)" text while keeping your tax amount intact. If one doesn’t work for your setup, give the other a shot—different themes and WooCommerce configurations can use slightly different hooks.

内容的提问来源于stack exchange,提问作者Alisha84

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.05.27 06:52:53