I am using this code to display customer_note in order confirmation email:
{{var order.getCustomerNote()|escape|nl2br}}
But it does not show up in the email. I also checked the value of customer_note in sales_order table to make sure it's not null.
And i went to Order model:
vendor/magento/module-sales/Model/Order.php
And return a test string:
/**
* Return customer_note
*
* @return string|null
*/
public function getCustomerNote()
{
return "i was here!";
return $this->getData(OrderInterface::CUSTOMER_NOTE);
}
Surprisingly i can see my test string show up in email.
Do you have any ideas why it doesnt work? Many thanks.