{"id":382991,"date":"2023-05-31T04:08:26","date_gmt":"2023-05-31T04:08:26","guid":{"rendered":"https:\/\/webkul.com\/blog\/?p=382991"},"modified":"2023-05-31T04:08:43","modified_gmt":"2023-05-31T04:08:43","slug":"add-order-notes-in-woocommerce-programmatically","status":"publish","type":"post","link":"https:\/\/webkul.com\/blog\/add-order-notes-in-woocommerce-programmatically\/","title":{"rendered":"How to Add Order Notes in WooCommerce Programmatically?"},"content":{"rendered":"\n<p>In this dev blog article, we will look into adding order notes in WooCommerce and also see how can we add and delete an order note manually and programmatically. <\/p>\n\n\n\n<div class=\"wk-index-wrap\"><div class=\"block-wrap\">\n<h2 class=\"wp-block-heading index-title\">What is an order note?<\/h2>\n<\/div><\/div>\n\n\n\n<p>WooCommerce order note is a custom message for our future reference or for the customer. It can be added by the admin.<\/p>\n\n\n\n<div class=\"wk-index-wrap\"><div class=\"block-wrap\">\n<h2 class=\"wp-block-heading index-title\">Types of order notes<\/h2>\n<\/div><\/div>\n\n\n\n<p>There are two types of order notes.<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Private note<\/li>\n\n\n\n<li>Note for the customer.<\/li>\n<\/ol>\n\n\n\n<p><strong>1. Private note<\/strong>:  When we write some note for a particular order for our future reference but we don&#8217;t notify the customer then we add a private note.<\/p>\n\n\n\n<p><strong>2. Note for the customer<\/strong>: When we have to send a note to the customer and notify them then we add a note for the customer.<\/p>\n\n\n\n<p>This is all about the WooCommerce order notes and types of order notes. Now move towards the add order note. <\/p>\n\n\n\n<div class=\"wk-index-wrap\"><div class=\"block-wrap\">\n<h2 class=\"wp-block-heading index-title\">How to add order notes manually?<\/h2>\n<\/div><\/div>\n\n\n\n<p>In this section, we will look into how to add order notes manually.<\/p>\n\n\n\n<p>Go to WooCommerce&#8212;&gt; Orders &#8212;&gt; Click on any order that which you want to add a note.<\/p>\n\n\n\n<p>Here you will see a section of <strong>Order Notes <\/strong>on the right-hand side. Add your message in the textarea and select the type of note and click on the add button to add the note for that order.<\/p>\n\n\n\n<p>If you add a note for the customer then the customer will notify through the email.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" width=\"1200\" height=\"618\" src=\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/05\/order-note-1200x618.png\" alt=\"add order notes in WooCommerce\" class=\"wp-image-383036\" srcset=\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/05\/order-note-1200x618.png 1200w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/05\/order-note-300x154.png 300w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/05\/order-note-250x129.png 250w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/05\/order-note-768x395.png 768w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/05\/order-note.png 1290w\" sizes=\"(max-width: 1200px) 100vw, 1200px\" loading=\"lazy\" \/><\/figure>\n\n\n\n<p>If you want to delete any of the order notes then simply click on the <strong>Delete note<\/strong> link which will appear below the order note as you can see in the above attached image. <\/p>\n\n\n\n<div class=\"wk-index-wrap\"><div class=\"block-wrap\">\n<h2 class=\"wp-block-heading index-title\">How to add and delete WooCommerce order notes programmatically?<\/h2>\n<\/div><\/div>\n\n\n\n<p>In this section, we will look into how to add and delete order notes programmatically. <\/p>\n\n\n\n<p><strong>1. Add Order Note<\/strong><\/p>\n\n\n\n<p>There are several ways to add notes in the order<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\">$order_note = &#039;Your order note here&#039;;\n\n\/**\n * First method to add order note programmatically in woocommerce.\n * Using the &lt;strong&gt;WC_Order &lt;\/strong&gt;class.\n *\/\n $order = new WC_Order( $order_id ); \n $order-&gt;add_order_note( $order_note ); \/\/ This will add as a private note.\n $order-&gt;add_order_note( $order_note, 1 ); \/\/This will add note for the customer.\n\n\/**\n * Second method to add order note programmatically in woocommerce.\n * If you don&#039;t want to use WC_Order class then you can use\n *\/\n $order = wc_get_order( $order-&gt;get_id() );\n $order-&gt;add_order_note( $order_note ); \/\/ This will add as a private note.\n $order-&gt;add_order_note( $order_note, 1 ); \/\/This will add note for the customer.\n\n\n\/**\n * Third method to add order note programmatically in woocommerce.\n * You can also add order note on hook while creating order note.\n *\/\n add_action( &#039;woocommerce_new_order&#039;, &#039;add_custom_order_note&#039;,  10, 1  );\n\n    function add_custom_order_note( $order_id ) {\n       \n       $order = new WC_Order( $order_id ); \n       $order-&gt;add_order_note( $order_note ); \/\/ This will add as a private note.\n       $order-&gt;add_order_note( $order_note, 1 ); \/\/This will add note for          the customer.\n    }<\/pre>\n\n\n\n<p><strong>2. Get all WooCommerce order notes programmatically.<\/strong><\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\">\/**\n * Get all order notes of a particular order id.\n *\n * @param int $order_id Order id.\n * \n * @return array $order_notes All order notes that belogs to the given order id. \n *\/\nfunction get_order_notes( $order_id ) {\n    remove_filter( &#039;comments_clauses&#039;, array( &#039;WC_Comments&#039;, &#039;exclude_order_comments&#039; ) );\n\n\t$comments = get_comments(\n\t\tarray(\n\t\t\t&#039;post_id&#039; =&gt; $order_id,\n\t\t\t&#039;orderby&#039; =&gt; &#039;comment_ID&#039;,\n\t\t\t&#039;order&#039;   =&gt; &#039;DESC&#039;,\n\t\t\t&#039;approve&#039; =&gt; &#039;approve&#039;,\n\t\t\t&#039;type&#039;    =&gt; &#039;order_note&#039;,\n\t\t)\n\t);\n\n\t$order_notes = wp_list_pluck( $comments, &#039;comment_content&#039;, &#039;comment_ID&#039; );\n\n    \/\/ You can also use the below code to get notes.\n    \/\/$notes = get_comments( $comments )\n\n\n\tforeach ( $order_notes as $key =&gt; $note ) {\n\t\t$is_customer = get_comment_meta( $key, &#039;is_customer_note&#039;, true );\n\t\t$order_notes&#091; $key ] = array(\n            &#039;note_id&#039;    =&gt; $key\n\t        &#039;order_note&#039; =&gt; $note,\n\t        &#039;note_type&#039;  =&gt; $is_customer,\n\t\t);\n\t}\n\n\tadd_filter( &#039;comments_clauses&#039;, array( &#039;WC_Comments&#039;, &#039;exclude_order_comments&#039; ) );\n\t\n\treturn $order_notes;\n}<\/pre>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p>Just call the any one above function and pass the order id. It will return the all order notes that belongs to the given order id.<\/p>\n\n\n\n<p>Note &#8211; If you have comment_id then you can use <strong>wc_get_order_note( $comment_id )<\/strong> to retrieve the order note.<\/p>\n<\/blockquote>\n\n\n\n<p>Delete Order Notes.<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\">\/**\n * Here is the code to delete the order note.\n *\n * wp_delete_comment is the core function of wordpress.\n *\/\nwp_delete_comment( $comment_id );<\/pre>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p>\/\/ If you want to do something after the delete the comment then you can add your action on the below do action hook.<\/p>\n\n\n\n<p><a href=\"https:\/\/developer.wordpress.org\/reference\/functions\/wp_update_comment\/\" target=\"_blank\" rel=\"noreferrer noopener\">do_action( &#8216;delete_comment&#8217;, string $comment_id, WP_Comment $comment )<\/a><\/p>\n<\/blockquote>\n\n\n\n<div class=\"wk-index-wrap\"><div class=\"block-wrap\">\n<h2 class=\"wp-block-heading index-title\">Conclusion<\/h2>\n<\/div><\/div>\n\n\n\n<p>Thanks for reading this dev blog, so if you have read the entire blog thoroughly then you are able to manage the order notes by yourself either manually or programmatically.<\/p>\n\n\n\n<p>Furthermore, if you have any doubts or queries related to this blog then kindly comment in the comment section.<\/p>\n\n\n\n<p>We will revert you as soon as possible on the same.<\/p>\n\n\n\n<div class=\"wk-index-wrap\"><div class=\"block-wrap\">\n<h2 class=\"wp-block-heading index-title\">WooCoomerce Support<\/h2>\n<\/div><\/div>\n\n\n\n<p>If you need any kind of support or you want to grow your business systematically and hassle-free then kindly visit the&nbsp;<a href=\"https:\/\/store.webkul.com\/woocommerce-plugins.html\" target=\"_blank\" rel=\"noreferrer noopener\">WooCommerce plugins<\/a>&nbsp;page to see our add-ons. For any technical assistance, please&nbsp;<a href=\"https:\/\/webkul.uvdesk.com\/en\/customer\/create-ticket\/\" target=\"_blank\" rel=\"noreferrer noopener\">raise a ticket<\/a>&nbsp;or reach us by mail at&nbsp;<a href=\"mailto:support@webkul.com\">support@webkul.com<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>In this dev blog article, we will look into adding order notes in WooCommerce and also see how can we add and delete an order note manually and programmatically. WooCommerce order note is a custom message for our future reference or for the customer. It can be added by the admin. There are two types <a href=\"https:\/\/webkul.com\/blog\/add-order-notes-in-woocommerce-programmatically\/\">[&#8230;]<\/a><\/p>\n","protected":false},"author":501,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[7966],"tags":[],"class_list":["post-382991","post","type-post","status-publish","format-standard","hentry","category-wordpress-woocommerce"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v24.5 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>How to Add Order Notes in WooCommerce Programmatically?<\/title>\n<meta name=\"description\" content=\"Know how to add order notes in WooCommerce and also see how can we add and delete an order note manually and programmatically.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/webkul.com\/blog\/add-order-notes-in-woocommerce-programmatically\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to Add Order Notes in WooCommerce Programmatically?\" \/>\n<meta property=\"og:description\" content=\"Know how to add order notes in WooCommerce and also see how can we add and delete an order note manually and programmatically.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/webkul.com\/blog\/add-order-notes-in-woocommerce-programmatically\/\" \/>\n<meta property=\"og:site_name\" content=\"Webkul Blog\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/webkul\/\" \/>\n<meta property=\"article:published_time\" content=\"2023-05-31T04:08:26+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2023-05-31T04:08:43+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/webkul.com\/blog\/wp-content\/uploads\/2023\/05\/order-note-1200x618.png\" \/>\n<meta name=\"author\" content=\"Vikas Kumar\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@webkul\" \/>\n<meta name=\"twitter:site\" content=\"@webkul\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Vikas Kumar\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"4 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/webkul.com\/blog\/add-order-notes-in-woocommerce-programmatically\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/webkul.com\/blog\/add-order-notes-in-woocommerce-programmatically\/\"},\"author\":{\"name\":\"Vikas Kumar\",\"@id\":\"https:\/\/webkul.com\/blog\/#\/schema\/person\/b8a27a0bc18753ccfc25864afea78bbb\"},\"headline\":\"How to Add Order Notes in WooCommerce Programmatically?\",\"datePublished\":\"2023-05-31T04:08:26+00:00\",\"dateModified\":\"2023-05-31T04:08:43+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/webkul.com\/blog\/add-order-notes-in-woocommerce-programmatically\/\"},\"wordCount\":519,\"commentCount\":1,\"publisher\":{\"@id\":\"https:\/\/webkul.com\/blog\/#organization\"},\"image\":{\"@id\":\"https:\/\/webkul.com\/blog\/add-order-notes-in-woocommerce-programmatically\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/webkul.com\/blog\/wp-content\/uploads\/2023\/05\/order-note-1200x618.png\",\"articleSection\":[\"WooCommerce\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/webkul.com\/blog\/add-order-notes-in-woocommerce-programmatically\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/webkul.com\/blog\/add-order-notes-in-woocommerce-programmatically\/\",\"url\":\"https:\/\/webkul.com\/blog\/add-order-notes-in-woocommerce-programmatically\/\",\"name\":\"How to Add Order Notes in WooCommerce Programmatically?\",\"isPartOf\":{\"@id\":\"https:\/\/webkul.com\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/webkul.com\/blog\/add-order-notes-in-woocommerce-programmatically\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/webkul.com\/blog\/add-order-notes-in-woocommerce-programmatically\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/webkul.com\/blog\/wp-content\/uploads\/2023\/05\/order-note-1200x618.png\",\"datePublished\":\"2023-05-31T04:08:26+00:00\",\"dateModified\":\"2023-05-31T04:08:43+00:00\",\"description\":\"Know how to add order notes in WooCommerce and also see how can we add and delete an order note manually and programmatically.\",\"breadcrumb\":{\"@id\":\"https:\/\/webkul.com\/blog\/add-order-notes-in-woocommerce-programmatically\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/webkul.com\/blog\/add-order-notes-in-woocommerce-programmatically\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/webkul.com\/blog\/add-order-notes-in-woocommerce-programmatically\/#primaryimage\",\"url\":\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/05\/order-note.png\",\"contentUrl\":\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/05\/order-note.png\",\"width\":1290,\"height\":664,\"caption\":\"order-note\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/webkul.com\/blog\/add-order-notes-in-woocommerce-programmatically\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/webkul.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How to Add Order Notes in WooCommerce Programmatically?\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/webkul.com\/blog\/#website\",\"url\":\"https:\/\/webkul.com\/blog\/\",\"name\":\"Webkul Blog\",\"description\":\"\",\"publisher\":{\"@id\":\"https:\/\/webkul.com\/blog\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/webkul.com\/blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/webkul.com\/blog\/#organization\",\"name\":\"WebKul Software Private Limited\",\"url\":\"https:\/\/webkul.com\/blog\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/webkul.com\/blog\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2021\/08\/webkul-logo-accent-sq.png\",\"contentUrl\":\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2021\/08\/webkul-logo-accent-sq.png\",\"width\":380,\"height\":380,\"caption\":\"WebKul Software Private Limited\"},\"image\":{\"@id\":\"https:\/\/webkul.com\/blog\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/webkul\/\",\"https:\/\/x.com\/webkul\",\"https:\/\/www.instagram.com\/webkul\/\",\"https:\/\/www.linkedin.com\/company\/webkul\",\"https:\/\/www.youtube.com\/user\/webkul\/\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/webkul.com\/blog\/#\/schema\/person\/b8a27a0bc18753ccfc25864afea78bbb\",\"name\":\"Vikas Kumar\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/webkul.com\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/b234cdb5707115f695d3d0d16d69508d111403c6e7ecd52fe7209407b75d17ae?s=96&d=https%3A%2F%2Fcdnblog.webkul.com%2Fblog%2Fwp-content%2Fuploads%2F2019%2F10%2Fmike.png&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/b234cdb5707115f695d3d0d16d69508d111403c6e7ecd52fe7209407b75d17ae?s=96&d=https%3A%2F%2Fcdnblog.webkul.com%2Fblog%2Fwp-content%2Fuploads%2F2019%2F10%2Fmike.png&r=g\",\"caption\":\"Vikas Kumar\"},\"description\":\"Vikas Kumar is a skilled developer with expertise in React JS, Redux, and Angular JS. He specializes in Custom Plugin Development and PoS App Development, delivering innovative and seamless solutions that enhance user experiences and meet diverse client needs with precision.\",\"url\":\"https:\/\/webkul.com\/blog\/author\/vikas-kumar662\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How to Add Order Notes in WooCommerce Programmatically?","description":"Know how to add order notes in WooCommerce and also see how can we add and delete an order note manually and programmatically.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/webkul.com\/blog\/add-order-notes-in-woocommerce-programmatically\/","og_locale":"en_US","og_type":"article","og_title":"How to Add Order Notes in WooCommerce Programmatically?","og_description":"Know how to add order notes in WooCommerce and also see how can we add and delete an order note manually and programmatically.","og_url":"https:\/\/webkul.com\/blog\/add-order-notes-in-woocommerce-programmatically\/","og_site_name":"Webkul Blog","article_publisher":"https:\/\/www.facebook.com\/webkul\/","article_published_time":"2023-05-31T04:08:26+00:00","article_modified_time":"2023-05-31T04:08:43+00:00","og_image":[{"url":"https:\/\/webkul.com\/blog\/wp-content\/uploads\/2023\/05\/order-note-1200x618.png","type":"","width":"","height":""}],"author":"Vikas Kumar","twitter_card":"summary_large_image","twitter_creator":"@webkul","twitter_site":"@webkul","twitter_misc":{"Written by":"Vikas Kumar","Est. reading time":"4 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/webkul.com\/blog\/add-order-notes-in-woocommerce-programmatically\/#article","isPartOf":{"@id":"https:\/\/webkul.com\/blog\/add-order-notes-in-woocommerce-programmatically\/"},"author":{"name":"Vikas Kumar","@id":"https:\/\/webkul.com\/blog\/#\/schema\/person\/b8a27a0bc18753ccfc25864afea78bbb"},"headline":"How to Add Order Notes in WooCommerce Programmatically?","datePublished":"2023-05-31T04:08:26+00:00","dateModified":"2023-05-31T04:08:43+00:00","mainEntityOfPage":{"@id":"https:\/\/webkul.com\/blog\/add-order-notes-in-woocommerce-programmatically\/"},"wordCount":519,"commentCount":1,"publisher":{"@id":"https:\/\/webkul.com\/blog\/#organization"},"image":{"@id":"https:\/\/webkul.com\/blog\/add-order-notes-in-woocommerce-programmatically\/#primaryimage"},"thumbnailUrl":"https:\/\/webkul.com\/blog\/wp-content\/uploads\/2023\/05\/order-note-1200x618.png","articleSection":["WooCommerce"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/webkul.com\/blog\/add-order-notes-in-woocommerce-programmatically\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/webkul.com\/blog\/add-order-notes-in-woocommerce-programmatically\/","url":"https:\/\/webkul.com\/blog\/add-order-notes-in-woocommerce-programmatically\/","name":"How to Add Order Notes in WooCommerce Programmatically?","isPartOf":{"@id":"https:\/\/webkul.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/webkul.com\/blog\/add-order-notes-in-woocommerce-programmatically\/#primaryimage"},"image":{"@id":"https:\/\/webkul.com\/blog\/add-order-notes-in-woocommerce-programmatically\/#primaryimage"},"thumbnailUrl":"https:\/\/webkul.com\/blog\/wp-content\/uploads\/2023\/05\/order-note-1200x618.png","datePublished":"2023-05-31T04:08:26+00:00","dateModified":"2023-05-31T04:08:43+00:00","description":"Know how to add order notes in WooCommerce and also see how can we add and delete an order note manually and programmatically.","breadcrumb":{"@id":"https:\/\/webkul.com\/blog\/add-order-notes-in-woocommerce-programmatically\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/webkul.com\/blog\/add-order-notes-in-woocommerce-programmatically\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/webkul.com\/blog\/add-order-notes-in-woocommerce-programmatically\/#primaryimage","url":"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/05\/order-note.png","contentUrl":"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/05\/order-note.png","width":1290,"height":664,"caption":"order-note"},{"@type":"BreadcrumbList","@id":"https:\/\/webkul.com\/blog\/add-order-notes-in-woocommerce-programmatically\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/webkul.com\/blog\/"},{"@type":"ListItem","position":2,"name":"How to Add Order Notes in WooCommerce Programmatically?"}]},{"@type":"WebSite","@id":"https:\/\/webkul.com\/blog\/#website","url":"https:\/\/webkul.com\/blog\/","name":"Webkul Blog","description":"","publisher":{"@id":"https:\/\/webkul.com\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/webkul.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/webkul.com\/blog\/#organization","name":"WebKul Software Private Limited","url":"https:\/\/webkul.com\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/webkul.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2021\/08\/webkul-logo-accent-sq.png","contentUrl":"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2021\/08\/webkul-logo-accent-sq.png","width":380,"height":380,"caption":"WebKul Software Private Limited"},"image":{"@id":"https:\/\/webkul.com\/blog\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/webkul\/","https:\/\/x.com\/webkul","https:\/\/www.instagram.com\/webkul\/","https:\/\/www.linkedin.com\/company\/webkul","https:\/\/www.youtube.com\/user\/webkul\/"]},{"@type":"Person","@id":"https:\/\/webkul.com\/blog\/#\/schema\/person\/b8a27a0bc18753ccfc25864afea78bbb","name":"Vikas Kumar","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/webkul.com\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/b234cdb5707115f695d3d0d16d69508d111403c6e7ecd52fe7209407b75d17ae?s=96&d=https%3A%2F%2Fcdnblog.webkul.com%2Fblog%2Fwp-content%2Fuploads%2F2019%2F10%2Fmike.png&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/b234cdb5707115f695d3d0d16d69508d111403c6e7ecd52fe7209407b75d17ae?s=96&d=https%3A%2F%2Fcdnblog.webkul.com%2Fblog%2Fwp-content%2Fuploads%2F2019%2F10%2Fmike.png&r=g","caption":"Vikas Kumar"},"description":"Vikas Kumar is a skilled developer with expertise in React JS, Redux, and Angular JS. He specializes in Custom Plugin Development and PoS App Development, delivering innovative and seamless solutions that enhance user experiences and meet diverse client needs with precision.","url":"https:\/\/webkul.com\/blog\/author\/vikas-kumar662\/"}]}},"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/posts\/382991","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/users\/501"}],"replies":[{"embeddable":true,"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/comments?post=382991"}],"version-history":[{"count":67,"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/posts\/382991\/revisions"}],"predecessor-version":[{"id":384621,"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/posts\/382991\/revisions\/384621"}],"wp:attachment":[{"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/media?parent=382991"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/categories?post=382991"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/tags?post=382991"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}