Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 5 You must be signed in to star a gist
  • Fork 3 You must be signed in to fork a gist
  • Save mikejolley/c4606aa52754b334f0f1bbe7e5b5ca6b to your computer and use it in GitHub Desktop.
Save mikejolley/c4606aa52754b334f0f1bbe7e5b5ca6b to your computer and use it in GitHub Desktop.
WooCommerce - remove payment method from emails
<?php // Do not include this if already open!
/**
* Code goes in theme functions.php.
*/
add_filter( 'woocommerce_get_order_item_totals', 'custom_woocommerce_get_order_item_totals' );
function custom_woocommerce_get_order_item_totals( $totals ) {
unset( $totals['payment_method'] );
return $totals;
}
@getmanzooronline
Copy link

@Drugoy,
Here is an answer for you after 4 years. The text you mentioned can be updated from the payment gateway settings page.

@Drugoy
Copy link

Drugoy commented Oct 22, 2020

@getmanzooronline, Thanks for the answer. But updating text is not the same as removing the item altogether.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment