{"id":11074711,"date":"2019-01-10T19:19:16","date_gmt":"2019-01-10T19:19:16","guid":{"rendered":"https:\/\/wordpress.org\/support\/topic\/invoice-number-empty-when-sending-e-mail\/"},"modified":"2019-01-10T19:19:16","modified_gmt":"2019-01-10T19:19:16","slug":"invoice-number-empty-when-sending-e-mail","status":"publish","type":"topic","link":"https:\/\/wordpress.org\/support\/topic\/invoice-number-empty-when-sending-e-mail\/","title":{"rendered":"Invoice number empty when sending e-mail"},"content":{"rendered":"<p>Since talking in ordernumbers and invoicenumbers can be confusing for our customers I edited the woocommerce email templates (copy to child theme) so this will display the invoice number instead of the ordernumber:<\/p>\n<p>$order-&gt;get_meta( &#8216;_wcpdf_invoice_number&#8217; )<\/p>\n<p>When the order has status &#8216;Processing&#8217; and the first e-mail is sent to the customer the Invoice Number is not yet generated and empty. This results in an customer-processing-order e-mail with an attached invoice PDF but with an empty invoice number in the HTML e-mail.<\/p>\n<p>How can I change the order of generation that the Invoice number is generated on save time of the order?<\/p>\n","protected":false},"template":"","class_list":["post-11074711","topic","type-topic","status-publish","hentry","topic-tag-email-body","topic-tag-email-text"],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/11074711","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\/11074711\/revisions"}],"wp:attachment":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/media?parent=11074711"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}