{"id":18580920,"date":"2025-08-01T01:35:42","date_gmt":"2025-08-01T01:35:42","guid":{"rendered":"https:\/\/wordpress.org\/support\/topic\/dev-hooks\/"},"modified":"2025-08-01T01:35:42","modified_gmt":"2025-08-01T01:35:42","slug":"dev-hooks","status":"publish","type":"topic","link":"https:\/\/wordpress.org\/support\/topic\/dev-hooks\/","title":{"rendered":"Dev hooks?"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">I&#8217;m importing orders and want the plugin to renumber orders at the end of the process. If I click Update in the admin, this happens, but not when importing the order items. I execute the following code at the end of the import as it saves the post (order):<br \/><br \/><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">$order = new WC_Order( $post_id );<br \/>$order-&gt;calculate_totals();<br \/>$order-&gt;save();<br \/><br \/>Despite this the order doesn&#8217;t invoice this plugin. Is there a function to do that? <\/p>\n","protected":false},"template":"","class_list":["post-18580920","topic","type-topic","status-publish","hentry"],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/18580920","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\/18580920\/revisions"}],"wp:attachment":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/media?parent=18580920"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}