0

I am using woocommerce 2.6.4 and I am trying to customize the email customer gets as confirmation for new order. I need to hide Subtotal and Payment method from the order details within the email template. I manged to hide subtotal with the following code I put in functions.php:

 add_filter( 'woocommerce_get_order_item_totals', 'adjust_woocommerce_get_order_item_totals' );

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

Is there any way to hide the payment method as well? Thank you all in advance.

1

I manged to figure this one out. For anyone having the same problem maybe, here is the solution. Just add

 unset( $totals['payment_method'] );

before

return $totals;

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.