skip to Main Content

I have tried to address the problem like this:

add_filter( 'woocommerce_rate_label', 'custom_tax_rate_label', 10, 2 );
function custom_tax_rate_label( $rate_name, $key ){
    return '';
}

But this only hides the tax label on checkout. I need the label to be hidden in invoice PDF.Invoice Label (between green frame: inkl. 14.00$ Mwst. AT 20%)

2

Answers


  1. You can try this. First I created custom action in themes>current theme> functions.php like this:

    add_action('woocommerce_mail_without_mail', 'woocommerce_mail_without_mail');
     public function dokan_mail_without_mail( $values ) {
      $without_tax=explode('(',$values);
      echo count($without_tax)>0 ? wp_kses_post($without_tax[0] ): 
       wp_kses_post($values);
       }
    

    And add custom action to wp-content>plugins>woocommerce>templates>emails>email-order-details.php(or other email templates but templates have to have $total[‘value’] code partical ) line 72 like this:

    <?php  do_action('dokan_mail_without_mail',$total['value']) ?>
    
    Login or Signup to reply.
  2. than put condition on invoice file so it will be stay hidden.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search