• Resolved kristinubute

    (@kristinubute)


    HI

    How do I remove in Billing Section – the wording ( Tax estimated for Australia) OR reword it ?

    Total $4.95 (includes $0.45 Tax estimated for Australia)

    Basically the client doesn’t want that wording there and I can’t seem to find where to CHANGE this ..

    Prefer to just change it to (inc GST) that’s it..

    Any help would be greatly appreciated

    Thx
    Krsitin

Viewing 7 replies - 1 through 7 (of 7 total)
  • Thread Starter kristinubute

    (@kristinubute)

    Or the “Review Order” section on the right side of the Billing Section I am referring to

    Thx
    Kristin

    Thread Starter kristinubute

    (@kristinubute)

    OR “Cart Totals” area

    Bit confusing what to call this area.

    Thx
    Kristin

    Thread Starter kristinubute

    (@kristinubute)

    Hi All

    I found this coding whilst googling for 3 hours …

    It worked ** It may help others in future !

    I don’t know how to reword it but it got rid of most of that long wording anyway !

    Using WordPress 4.9.4 working with this code in functions.php

    add_filter( ‘woocommerce_cart_totals_order_total_html’, ‘custom_cart_totals_order_total_html’, 20, 1 );
    function custom_cart_totals_order_total_html( $value ){
    $value = ‘‘ . WC()->cart->get_total() . ‘ ‘;

    // If prices are tax inclusive, show taxes here.
    $incl_tax_display_cart = version_compare( WC_VERSION, ‘3.3’, ‘<‘ ) ? WC()->cart->tax_display_cart == ‘incl’ : WC()->cart->display_prices_including_tax();
    if ( wc_tax_enabled() && $incl_tax_display_cart ) {
    $tax_string_array = array();
    $cart_tax_totals = WC()->cart->get_tax_totals();

    if ( get_option( ‘woocommerce_tax_total_display’ ) == ‘itemized’ ) {
    foreach ( $cart_tax_totals as $code => $tax ) {
    $tax_string_array[] = sprintf( ‘%s %s’, $tax->formatted_amount, $tax->label );
    }
    } elseif ( ! empty( $cart_tax_totals ) ) {
    $tax_string_array[] = sprintf( ‘%s %s’, wc_price( WC()->cart->get_taxes_total( true, true ) ), WC()->countries->tax_or_vat() );
    }

    if ( ! empty( $tax_string_array ) ) {
    $taxable_address = WC()->customer->get_taxable_address();
    $estimated_text = ”;
    $value .= ‘<small class=”includes_tax”>’ . sprintf( __( ‘(includes %s)’, ‘woocommerce’ ), implode( ‘, ‘, $tax_string_array ) . $estimated_text ) . ‘</small>’;
    }
    }
    return $value;
    }

    Caleb Burks

    (@icaleb)

    Automattic Happiness Engineer

    I am pretty sure this original text was not from WooCommerce directly. Perhaps a custom tax label you had set up at WooCommerce > Settings > Tax, or applied to the tax rate/class directly.

    But thanks for sharing what you found.

    Thread Starter kristinubute

    (@kristinubute)

    Hi

    No I hadn’t set up a custom tax label at all.

    I had just called the label GST for the tax side of things.

    It seems to be default in all my new Woocommerce installs for new clients so therefore I assume it was default as I hadn’t typed it anywhere.

    I’m just going into the area you mentioned WooCommerce > Settings > Tax

    There is nothing in this setting that refers to this in these settings. Where else would I try and locate it. Definately seems to be from Woocommerce as far as I can tell.

    I have no idea how to apply to the tax rate/class directly that you mentioned.

    Where else can I look ?

    When I go into Inspect Element on the browser it refers to:
    .cart-collaterals .cart_totals small.includes_tax {
    display: inline;
    }

    Which Woocommerce file would that be reflecting in the backend templates maybe I can see in there ?

    I need to be able to change it on the mobile version (that code I found only fixes on PC and tablet) but not mobile so am still a bit stuck now.

    I need to be able to remove that text (or change it to ONLY read inc GST) and provide a CSS code for the mobile section.

    Thx
    Krsitin

    Thread Starter kristinubute

    (@kristinubute)

    So therefore I have gone into Woocommerce templates/Cart/Cart-totals.php

    and there is line of coding

    <tr class=”order-total”>
    <th><?php _e( ‘Total’, ‘woocommerce’ ); ?></th>
    <td data-title=”<?php esc_attr_e( ‘Total’, ‘woocommerce’ ); ?>”><?php wc_cart_totals_order_total_html(); ?></td>
    </tr>

    Which is the last line of text on that Cart Totals page

    This is where I have to change it (copy and put it into the Child theme) but not sure how to change it or which part as it doesn’t refer to tax in here .. but says ‘woocommerce’ next to ‘Total’

    Thx
    Kristin

    Thread Starter kristinubute

    (@kristinubute)

    And here . this is part of the same file … this refers to ? sprintf( ‘ <small>’ . __( ‘(estimated for %s)’, ‘woocommerce’ ) . ‘</small>’, WC()->countries->

    <?php if ( wc_tax_enabled() && ‘excl’ === WC()->cart->tax_display_cart ) :
    $taxable_address = WC()->customer->get_taxable_address();
    $estimated_text = WC()->customer->is_customer_outside_base() && ! WC()->customer->has_calculated_shipping()
    ? sprintf( ‘ <small>’ . __( ‘(estimated for %s)’, ‘woocommerce’ ) . ‘</small>’, WC()->countries->estimated_for_prefix( $taxable_address[0] ) . WC()->countries->countries[ $taxable_address[0] ] )
    : ”;

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘How to remove in Billing Section – Tax estimated for Australia or reword it’ is closed to new replies.