- Issue created by @luke.stewart
Currently it looks like Drupal Core is stripping the vertical-align: top
style from the tr
that contains the Shipping and Billing information in
modules/order/templates/commerce-order-receipt.html.twig
This doesn't occur when triggered as admin via the Resend Receipt.
Initially I thought this might be happening at the mail client level but have stepped through using XDebug and can see the style stripped in the generated twig template which is being rendered.
I was able to reproduce from the command line using drush using the following:
$order_storage = \Drupal::entityTypeManager()->getStorage('commerce_order');
$order = $order_storage->load(<orderid>);
$receipt_mailer = \Drupal::service('commerce_order.order_receipt_mail');
$receipt_mailer->send($order, $order->getEmail(), 'test@example.com');
Where the orderid was for an existing order with both shipping and billing address details - note running this does trigger a resend of that receipt.
Running the code that is used from the resend receipt form -> $resend_mailer->send($order, NULL, NULL, TRUE);
Yields the same result - suggesting that this is a result of twig filters being applied.
I found reports of table inline styles being stripped here: https://stackoverflow.com/questions/60821014/drupal-8-stripping-style-at...
However there are other in line styles in use in this template. Shifting the style from the row to the cell (td) mean that the style wasn't stripped.
Active
3.0
Order