Skip to content

Instantly share code, notes, and snippets.

@corsonr
Created December 18, 2017 11:12
Show Gist options
  • Save corsonr/a3bee43e9fed7727d6711a073ebc8756 to your computer and use it in GitHub Desktop.
Save corsonr/a3bee43e9fed7727d6711a073ebc8756 to your computer and use it in GitHub Desktop.
WooCommerce: replace "tax" in "includes $xx.xx Tax" on the cart page
<?php // Do not include this if already open! Code goes in theme functions.php.
/**
* woocommerce_cart_totals_order_total_html
*
* @access public
* @since 1.0
* @return void
*/
add_filter( 'woocommerce_cart_totals_order_total_html', 'woo_rename_tax_inc_cart', 10, 1 );
function woo_rename_tax_inc_cart( $value ) {
$value = str_ireplace( 'Tax', 'GST', $value );
return $value;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment