My extension_attribute.xml file below:
<?xml version="1.0"?> <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Api/etc/extension_attributes.xsd"> <extension_attributes for="Magento\Quote\Api\Data\PaymentInterface"> <attribute code="comment" type="string"/> </extension_attributes> </config> I have created field (text box) in payment page Magento 2 checkout.
i want to save this value to customer_note column in sales_order_grid
I followed this answer
https://magento.stackexchange.com/a/187848/73525
but not working for (Payment comment field save )
this plugin not working
etc/di.xml
<type name="Magento\Checkout\Model\PaymentInformationManagement"> <plugin name="order_comments_save-in-order" type="Sugarcode\Deliverydate\Plugin\Checkout\PaymentInformationManagementPlugin" sortOrder="10"/> </type> How can I save this attribute to orders and order grid?