Title: Hide Payment Method from invoice
Last modified: March 6, 2021

---

# Hide Payment Method from invoice

 *  Resolved [tranowebmaster](https://wordpress.org/support/users/tranowebmaster/)
 * (@tranowebmaster)
 * [5 years, 3 months ago](https://wordpress.org/support/topic/hide-payment-method-from-invoice/)
 * 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](https://wordpress.org/support/users/yordansoares/)
 * (@yordansoares)
 * [5 years, 3 months ago](https://wordpress.org/support/topic/hide-payment-method-from-invoice/#post-14143700)
 * Hello [@tranowebmaster](https://wordpress.org/support/users/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](https://docs.wpovernight.com/general/how-to-use-filters/)
 * Let me know if it works!
 *  Thread Starter [tranowebmaster](https://wordpress.org/support/users/tranowebmaster/)
 * (@tranowebmaster)
 * [5 years, 3 months ago](https://wordpress.org/support/topic/hide-payment-method-from-invoice/#post-14146054)
 * Hello [@yordansoares](https://wordpress.org/support/users/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.

 * ![](https://ps.w.org/woocommerce-pdf-invoices-packing-slips/assets/icon-256x256.
   png?rev=2189942)
 * [PDF Invoices & Packing Slips for WooCommerce](https://wordpress.org/plugins/woocommerce-pdf-invoices-packing-slips/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/woocommerce-pdf-invoices-packing-slips/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/woocommerce-pdf-invoices-packing-slips/)
 * [Active Topics](https://wordpress.org/support/plugin/woocommerce-pdf-invoices-packing-slips/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/woocommerce-pdf-invoices-packing-slips/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/woocommerce-pdf-invoices-packing-slips/reviews/)

## Tags

 * [payment method](https://wordpress.org/support/topic-tag/payment-method/)
 * [PDF invoice](https://wordpress.org/support/topic-tag/pdf-invoice/)

 * 2 replies
 * 2 participants
 * Last reply from: [tranowebmaster](https://wordpress.org/support/users/tranowebmaster/)
 * Last activity: [5 years, 3 months ago](https://wordpress.org/support/topic/hide-payment-method-from-invoice/#post-14146054)
 * Status: resolved