The commerce-order-receipt.html.twig contains a variable called {{ payment_method }}, which returns no data. Likewise, when I add Payment Method field to my orders table view, it shows no data. Payment Gateway does contain the name of the payment method used in the order. I'd like to print that value in my order receipt email, but cannot seem to find the correct syntax. So far I have tried the following.

{{ payment_gateway }}
{{ order_entity.field_payment_gateway }}
{{ order_entity.field_payment_gateway.value }}
{{ field_payment_gateway }}
{{ field_payment_gateway.value }}

All of those turn up blank in the email.

How can I show the payment gateway title in the order receipt email?

1 Answer 1


This patch (https://www.drupal.org/files/issues/2019-02-26/order_receipt_payment_gateway_and_instructions.patch) from this thread (https://www.drupal.org/project/commerce/issues/2884497#comment-12988057) fixed my issue. It required patching commerce_order.module and commerce_payment.module, as well as adding the display code to the order email receipt twig.

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.