Add token support for the receiptBcc email in Order Receipt Subscriber

Created on 11 March 2025, 4 months ago

Describe your bug or feature request.

Tokens not recognized in the order types config form for the receiptBcc

If a bug, provide steps to reproduce it from a clean install.

Integrate the Drupal token service replace tokens function.

๐Ÿ› Bug report
Status

Needs review

Version

3.0

Component

Order

Created by

๐Ÿ‡ฎ๐Ÿ‡ณIndia pemson18 South Goa

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @pemson18
  • ivnish Kazakhstan

    Needs reroll to MR

  • ๐Ÿ‡ฎ๐Ÿ‡ณIndia prem suthar Ahemdabad- Gujrat , Jodhpur - Rajsthan

    prem suthar โ†’ made their first commit to this issueโ€™s fork.

  • @prem-suthar opened merge request.
  • ๐Ÿ‡ฎ๐Ÿ‡ฑIsrael jsacksick

    How is this working without changing the services.yml? I know we have autowiring now, but the arguments are explicitly specified for the subscriber.

  • ๐Ÿ‡ฎ๐Ÿ‡ณIndia prem suthar Ahemdabad- Gujrat , Jodhpur - Rajsthan

    @jsacksick yes you are right if we explicitly specified for the subscriber arguments then we need to add this .
    i got confused by this one i think it already exits.

      commerce_order.order_receipt_mail:
        class: Drupal\commerce_order\Mail\OrderReceiptMail
        arguments: ['@entity_type.manager', '@commerce.mail_handler', '@commerce_order.order_total_summary', '@token']

    Now i have added the third argument @token to the arguments array.

  • ๐Ÿ‡ฎ๐Ÿ‡ฑIsrael jsacksick

    Wait this is not the right place for this... This should be fixed from the OrderReceiptMail service which already does token replacements for the subject. We already have the token service available there.

  • ๐Ÿ‡ฎ๐Ÿ‡ณIndia prem suthar Ahemdabad- Gujrat , Jodhpur - Rajsthan

    @jsacksick I added it in the OrderReceiptSubscriber (commerce_order.order_receipt_subscriber), not in the OrderReceiptMail service.

  • ๐Ÿ‡ฎ๐Ÿ‡ฑIsrael jsacksick

    @prem suthar: Yes I know, that is exactly my point, it needs to be in the OrderReceiptMail service?

Production build 0.71.5 2024