Title: Remove (Includes %s)
Last modified: August 30, 2016

---

# Remove (Includes %s)

 *  Resolved [Troglos](https://wordpress.org/support/users/troglos/)
 * (@troglos)
 * [10 years, 7 months ago](https://wordpress.org/support/topic/remove-includes-s/)
 * Is there a working snippet to remove/hide the (Includes %s) ex tax in both site
   and email ?
    All the solutions I’ve found do not work at all.
 * Thanks

Viewing 11 replies - 1 through 11 (of 11 total)

 *  [jessepearson](https://wordpress.org/support/users/jessepearson/)
 * (@jessepearson)
 * Automattic Happiness Engineer
 * [10 years, 7 months ago](https://wordpress.org/support/topic/remove-includes-s/#post-6784009)
 * Hey [@troglos](https://wordpress.org/support/users/troglos/),
 * If the prices of your products do not include tax, then you can change the tax
   setting to, “No, I will enter prices exclusive of tax,” and that will remove 
   all of that text. This is under WooCommerce > Settings > Tax.
 * I know with all of the stores I’ve set up the tax was additional based on the
   shipping location, so it was added on after the fact.
 *  Thread Starter [Troglos](https://wordpress.org/support/users/troglos/)
 * (@troglos)
 * [10 years, 7 months ago](https://wordpress.org/support/topic/remove-includes-s/#post-6784084)
 * Well in Italy the prices include the taxes, so I don’t need to show them separately.
   
   Momentarily I’ve just replaced the translation in the .po with an empty space,
   but it’s not a clean solution.
 * I am sure it’s possible to override the functions.
 *  [jessepearson](https://wordpress.org/support/users/jessepearson/)
 * (@jessepearson)
 * Automattic Happiness Engineer
 * [10 years, 7 months ago](https://wordpress.org/support/topic/remove-includes-s/#post-6784110)
 * That’s good to know about the prices in Italy 🙂
 * This is the function that outputs the `(ex. tax)` text:
 *     ```
       /**
       	 * Include the Ex Tax label.
       	 * @return string
       	 */
       	public function ex_tax_or_vat() {
       		$return = in_array( $this->get_base_country(), $this->get_european_union_countries( 'eu_vat' ) ) ? __( '(ex. VAT)', 'woocommerce' ) : __( '(ex. tax)', 'woocommerce' );
   
       		return apply_filters( 'woocommerce_countries_ex_tax_or_vat', $return );
       	}
       ```
   
 * Since it applies filters, we can create this function:
 *     ```
       function woo_ex_tax_filter( $content ) {
   
       	if ( '(ex. tax)' == $content ) {
       		$content = '';
       	}
   
       	return $content;
       }
       add_filter( 'woocommerce_countries_ex_tax_or_vat', 'woo_ex_tax_filter', 99, 1 );
       ```
   
 * This will check to see if `(ex. tax)` is going to be output, and if so, it will
   remove it. It will only directly match `(ex. tax)`, though. If this is being 
   translated and no longer matches, it will not work.
 * If you never need the tax or vat snippet displayed, then you can use this:
 *     ```
       function woo_ex_tax_filter( $content ) {
       	return '';
       }
       add_filter( 'woocommerce_countries_ex_tax_or_vat', 'woo_ex_tax_filter', 99, 1 );
       ```
   
 *  Thread Starter [Troglos](https://wordpress.org/support/users/troglos/)
 * (@troglos)
 * [10 years, 7 months ago](https://wordpress.org/support/topic/remove-includes-s/#post-6784115)
 * Hi Jesse,
 * I’ve tried your last snippet but it doesn’t work.
    Back to the empty space in
   the .po
 * By the way, I see that there are only two places where the tax label (Includes%
   s) is used
 * this (in /includes/class-wc-order.php):
 *     ```
       public function get_formatted_order_total( $tax_display = '' ) {
       		$formatted_total = wc_price( $this->get_total(), array( 'currency' => $this->get_order_currency() ) );
       		$order_total    = $this->get_total();
       		$total_refunded = $this->get_total_refunded();
       		$tax_string     = '';
   
       		// Tax for inclusive prices
       		if ( wc_tax_enabled() && 'incl' == $tax_display ) {
       			$tax_string_array = array();
   
       			if ( 'itemized' == get_option( 'woocommerce_tax_total_display' ) ) {
       				foreach ( $this->get_tax_totals() as $code => $tax ) {
       					$tax_amount         = $total_refunded ? wc_price( WC_Tax::round( $tax->amount - $this->get_total_tax_refunded_by_rate_id( $tax->rate_id ) ), array( 'currency' => $this->get_order_currency() ) ) : $tax->formatted_amount;
       					$tax_string_array[] = sprintf( '%s %s', $tax_amount, $tax->label );
       				}
       			} else {
       				$tax_string_array[] = sprintf( '%s %s', wc_price( $this->get_total_tax() - $this->get_total_tax_refunded(), array( 'currency' => $this->get_order_currency() ) ), WC()->countries->tax_or_vat() );
       			}
       			if ( ! empty( $tax_string_array ) ) {
       				$tax_string = ' ' . sprintf( __( '(Includes %s)', 'woocommerce' ), implode( ', ', $tax_string_array ) );
       			}
       		}
   
       		if ( $total_refunded ) {
       			$formatted_total = '<del>' . strip_tags( $formatted_total ) . '</del> <ins>' . wc_price( $order_total - $total_refunded, array( 'currency' => $this->get_order_currency() ) ) . $tax_string . '</ins>';
       		} else {
       			$formatted_total .= $tax_string;
       		}
   
       		return apply_filters( 'woocommerce_get_formatted_order_total', $formatted_total, $this );
       	}
       ```
   
 * and this (in /includes/wc-cart-functions.php):
 *     ```
       function wc_cart_totals_order_total_html() {
       	$value = '<strong>' . WC()->cart->get_total() . '</strong> ';
   
       	// If prices are tax inclusive, show taxes here
       	if ( wc_tax_enabled() && WC()->cart->tax_display_cart == 'incl' ) {
       		$tax_string_array = array();
   
       		if ( get_option( 'woocommerce_tax_total_display' ) == 'itemized' ) {
       			foreach ( WC()->cart->get_tax_totals() as $code => $tax )
       				$tax_string_array[] = sprintf( '%s %s', $tax->formatted_amount, $tax->label );
       		} else {
       			$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 ) ) {
       			$value .= '<small class="includes_tax">' . sprintf( __( '(Includes %s)', 'woocommerce' ), implode( ', ', $tax_string_array ) ) . '</small>';
       		}
       	}
   
       	echo apply_filters( 'woocommerce_cart_totals_order_total_html', $value );
       }
       ```
   
 *  [jessepearson](https://wordpress.org/support/users/jessepearson/)
 * (@jessepearson)
 * Automattic Happiness Engineer
 * [10 years, 7 months ago](https://wordpress.org/support/topic/remove-includes-s/#post-6784121)
 * Ah, I misunderstood, I thought your were looking to remove the `ex.tax` part.
 * These filters are a little hacky, but I was trying to target the HTML in the 
   text strings and not the content. The first should work on the cart and checkout
   pages, the second works on order pages and emails.
 *     ```
       function woo_includes_tax_text_filter_1( $content ) {
   
       	// set up regex match, replace regex with nothing
       	$find 		= '/\<small.*small\>/Ui';
       	$content 	= preg_replace( $find, '', $content );
   
       	return $content;
       }
       add_filter( 'woocommerce_cart_totals_order_total_html', 'woo_includes_tax_text_filter_1', 99, 1 );
   
       function woo_includes_tax_text_filter_2( $content ) {
   
       	// set up regex, find matches, take only first match and return it
       	$find 		= '/\<span class\=\"amount\".*\<\/span\>/Ui';
       	preg_match( $find, $content, $matches );
       	$content 	= $matches[0];
   
       	return $content;
       }
       add_filter( 'woocommerce_get_formatted_order_total', 'woo_includes_tax_text_filter_2', 99, 1 );
       ```
   
 *  Thread Starter [Troglos](https://wordpress.org/support/users/troglos/)
 * (@troglos)
 * [10 years, 7 months ago](https://wordpress.org/support/topic/remove-includes-s/#post-6784126)
 * Great, it’s finally working now!
 * PS
    sorry for the ex.tax part, my mistake
 *  [jessepearson](https://wordpress.org/support/users/jessepearson/)
 * (@jessepearson)
 * Automattic Happiness Engineer
 * [10 years, 7 months ago](https://wordpress.org/support/topic/remove-includes-s/#post-6784127)
 * No worries, glad I could help.
 * Those functions should continue to work unless the output is changed by the Woo
   team, which probably won’t happen any time soon. You could also rename the functions
   if you wanted to, just make sure to rename the function name and how it’s called
   in `add_filter`.
 *  Thread Starter [Troglos](https://wordpress.org/support/users/troglos/)
 * (@troglos)
 * [10 years, 7 months ago](https://wordpress.org/support/topic/remove-includes-s/#post-6784128)
 * Thanks again
 *  [meldy](https://wordpress.org/support/users/meldy/)
 * (@meldy)
 * [9 years, 11 months ago](https://wordpress.org/support/topic/remove-includes-s/#post-6784363)
 * Hi, Guys.
    I´ve tried use the last Jesses code, but does´t work for me. Problem
   is, that after using code **total coast** is not showing. All field is empty 
   included total price. I want to remove only thesee text “(included 20.5€ tax)”.
   Have some solution for me please?
 *  [mother.of.code](https://wordpress.org/support/users/imazed/)
 * (@imazed)
 * The Mother of Code
 * [9 years, 11 months ago](https://wordpress.org/support/topic/remove-includes-s/#post-6784364)
 * Hey meldy, please open up your own ticket 🙂 there might be something else going
   on, and we like to keep things tidy. Thank you!
 *  [janukacs](https://wordpress.org/support/users/janukacs/)
 * (@janukacs)
 * [9 years, 7 months ago](https://wordpress.org/support/topic/remove-includes-s/#post-8464027)
 * In my website I have added product with cost $100, and I have added tax rule 
   only for AU customers 10% (tax including in product) in cart its shows as $100(
   including $10.00).
 * I need to show cost as $100 for other country’s customers as a $100 (including
   $00.00). but now it’s shows as a $90(including $00.00) for other countries. how
   can I fixed this.

Viewing 11 replies - 1 through 11 (of 11 total)

The topic ‘Remove (Includes %s)’ is closed to new replies.

 * ![](https://ps.w.org/woocommerce/assets/icon.svg?rev=3234504)
 * [WooCommerce](https://wordpress.org/plugins/woocommerce/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/woocommerce/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/woocommerce/)
 * [Active Topics](https://wordpress.org/support/plugin/woocommerce/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/woocommerce/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/woocommerce/reviews/)

 * 11 replies
 * 5 participants
 * Last reply from: [janukacs](https://wordpress.org/support/users/janukacs/)
 * Last activity: [9 years, 7 months ago](https://wordpress.org/support/topic/remove-includes-s/#post-8464027)
 * Status: resolved