if ( ! class_exists( 'Tax_Free_Output_Differenzbesteuert' ) ) { class Tax_Free_Output_Differenzbesteuert { public $message = 'Differenzbesteuert'; // hier Satz eintragen, der zu sehen sein wird public $tax_class = 'differenzbesteuert'; // anstatt 'steuerbefreit' hier Name der Steuerklasse eintragen public static $instance_counter = 0; public function __construct() { if ( self::$instance_counter < 1 ) { add_filter( 'wgm_get_tax_line', array( $this, 'wgm_get_tax_line' ), 10, 2 ); add_filter( 'gm_cart_template_in_theme_show_taxes_markup', array( $this, 'gm_cart_template_in_theme_show_taxes_markup' ), 10, 4 ); add_filter( 'wgm_template_add_mwst_rate_to_product_order_item', array( $this, 'wgm_template_add_mwst_rate_to_product_order_item' ), 10, 4 ); self::$instance_counter++; } } public function wgm_get_tax_line( $tax_line, $product ) { if ( is_object( $product ) && method_exists( $product, 'get_tax_class' ) ){ if ( $this->tax_class === $product->get_tax_class() ) { // anstatt 'steuerbefreit' hier Name der Steuerklasse eintragen $tax_line = $this->message; } } return $tax_line; } public function gm_cart_template_in_theme_show_taxes_markup( $text, $subtotal, $tax_string, $cart_item = null ) { if ( is_array( $cart_item ) && isset( $cart_item[ 'data' ] ) ) { $product = $cart_item[ 'data' ]; if ( is_object( $product ) && method_exists( $product, 'get_tax_class' ) ){ if ( $this->tax_class === $product->get_tax_class() ) { $text .= '
' . $this->message . ''; // hier Satz eintragen } } } return $text; } public function wgm_template_add_mwst_rate_to_product_order_item( $item, $subtotal, $complete_tax_string, $product = null ) { if ( is_object( $product ) && method_exists( $product, 'get_tax_class' ) ){ if ( $this->tax_class === $product->get_tax_class() ) { $item .= '' . $this->message . ''; // hier Satz eintragen } } return $item; } } add_action( 'after_setup_theme', function() { $tax_free_output = new Tax_Free_Output_Differenzbesteuert(); }); } Shop – Seite 1461 – Modellbahnparadies-Meiger