• Resolved tranowebmaster

    (@tranowebmaster)


    Hello Community & WooCommerce PDF Invoices & Packing Slips Team,

    I want to hide Payment Method from invoice. I added the code bellow to my child theme finctions.php to hide Subtotal and Payment method, it works fine for Subtotal but for Payment method doesn’t work. By the way this code works well for woocommerce emails.

    Code:

    function adjust_woocommerce_get_order_item_totals( $totals ) {
      unset($totals['cart_subtotal']  );
      unset( $totals['payment_method'] );
      return $totals;
    }

    Thank you

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Contributor Yordan Soares

    (@yordansoares)

    Hello @tranowebmaster,

    Please add this code snippet to your site:

    add_action( 'wpo_wcpdf_custom_styles', 'wpo_wcpdf_custom_styles', 10, 2 );
    function wpo_wcpdf_custom_styles ( $document_type, $document ) {
      if ($document_type == 'invoice'){
        ?>
        .payment-method {
          display: none;
        }	
        <?php
      }
    }

    If you haven’t worked with code snippets (actions/filters) or functions.php before, read this guide: How to use filters

    Let me know if it works!

    Thread Starter tranowebmaster

    (@tranowebmaster)

    Hello @yordansoares

    Thank you it works fine

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Hide Payment Method from invoice’ is closed to new replies.