In Woocommerce, I am adding products to cart using the GET method from an URL like:
http://example.com/cart/?add-to-cart=10
Now I would like to be able adding at the same time some custom data as a product note like:
http://example.com/cart/?add-to-cart=10¬e=hinote
And then saving that "hinote" value as the cart item data. Once oder is placed, I would like to save that "hinote" in order item data and display it as custom order item data everywhere.
Is that possible?
Any help is appreciated.
Yes that is possible and quiet simple… Try the following code:
Code goes in function.php file of your active child theme (or active theme). Tested and works.