{"id":12013099,"date":"2019-10-09T13:19:44","date_gmt":"2019-10-09T13:19:44","guid":{"rendered":"https:\/\/wordpress.org\/support\/topic\/update-new-order-before-invoice-is-generated\/"},"modified":"2019-10-09T13:19:44","modified_gmt":"2019-10-09T13:19:44","slug":"update-new-order-before-invoice-is-generated","status":"publish","type":"topic","link":"https:\/\/wordpress.org\/support\/topic\/update-new-order-before-invoice-is-generated\/","title":{"rendered":"Update new order before invoice is generated"},"content":{"rendered":"<p>Hello,<br \/>\nI have to check order items for stock (stock is checked through REST API from ERP and if stock is 0 then I should remove that item from order) after user have pressed Submit and  before order is created and invoice will be generated. I plan to do that check using <em>woocommerce_review_order_after_submit<\/em> hook. Is that hook the right place to do that or its too late?<\/p>\n","protected":false},"template":"","class_list":["post-12013099","topic","type-topic","status-publish","hentry"],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/12013099","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic"}],"about":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/types\/topic"}],"version-history":[{"count":0,"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/12013099\/revisions"}],"wp:attachment":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/media?parent=12013099"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}