• Hi
    When i sell outside my country the taxes are not charged. But the text, according to the woocommerce settings, still says inclusive tax. Is there a way to alter this text according to the condition tax or not?
    regards
    theo

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Support RK a11n

    (@riaanknoetze)

    Not directly as far as I know; Might need some custom coding to achieve that.

    Thread Starter timholz

    (@timholz)

    Hi Riaan
    Thanks a lot for the hint.
    I’ll dive into the matter.
    regards
    theo

    I’ll post my solution (not thoroughly tested, but seems to work):
    `//no tax for the world, except homeland
    function remove_tax_outside_home( $taxes, $price, $rates, $price_includes_tax, $suppress_rounding )
    {
    global $woocommerce;
    if(!is_admin() && $woocommerce->customer->get_country() <> “CH”){
    $taxes = array( 1 => “float(0.000)” );
    //echo ‘no tax’;
    }
    return $taxes;
    };
    add_filter( ‘woocommerce_calc_tax’, ‘remove_tax_outside_home’, 10, 5 );

    • This reply was modified 7 years, 10 months ago by timholz.
    Thread Starter timholz

    (@timholz)

    code didn’t get well formatted:

    //no tax for the world, except homeland
    function remove_tax_outside_home( $taxes, $price, $rates, $price_includes_tax, $suppress_rounding )
    {
        global $woocommerce;
        if(!is_admin() && $woocommerce->customer->get_country() <> "US"){//Your country code
            $taxes = array( 1 => "float(0.000)" );
            //echo 'no tax';
        }
        return $taxes;
    };
    // add the filter
    add_filter( 'woocommerce_calc_tax', 'remove_tax_outside_home', 10, 5 );
    • This reply was modified 7 years, 10 months ago by timholz.
Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘swop inclusive and exclusive tas’ is closed to new replies.