Remove payment method from email notification from WooCommerce

Remove payment method from email notification from WooCommerce on your child site.

Snippet Type

Execute on Child Sites

Snippet

add_filter( 'woocommerce_get_order_item_totals', 'remove_payment_method_row_from_emails', 10, 3 );
function remove_payment_method_row_from_emails( $total_rows, $order, $tax_display ){
    // On Email notifications only
    if ( ! is_wc_endpoint_url() ) {
        unset($total_rows['payment_method']);
    }
    return $total_rows;
}
1 Like