{"id":90009,"date":"2026-11-18T21:11:04","date_gmt":"2026-11-18T21:11:04","guid":{"rendered":"https:\/\/northcreativecollective.se\/?page_id=90009"},"modified":"2026-11-28T10:12:11","modified_gmt":"2026-11-28T10:12:11","slug":"packing-slips","status":"publish","type":"page","link":"https:\/\/northcreativecollective.se\/en\/docs\/developers\/packing-slips\/","title":{"rendered":"North Packing Slips &#038; Invoices hooks"},"content":{"rendered":"<p class=\"wp-block-paragraph\">You can change how documents look, add your own print buttons and use invoice data in other systems.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Your own template<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Copy a template into your theme and change it there. The plugin uses your copy automatically.<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table><thead><tr><th>Document<\/th><th>Copy from<\/th><th>To<\/th><\/tr><\/thead><tbody><tr><td>Packing slip<\/td><td><code>templates\/minimal\/packing-slip.php<\/code><\/td><td><code>yourtheme\/print-packing-slips-invoices\/minimal\/packing-slip.php<\/code><\/td><\/tr><tr><td>Invoice<\/td><td><code>templates\/minimal\/invoice.php<\/code><\/td><td><code>yourtheme\/print-packing-slips-invoices\/minimal\/invoice.php<\/code><\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">The templates <strong>Classic<\/strong> and <strong>Compact<\/strong> use the same markup as <strong>Minimal<\/strong> with different styling. To change one of them only, put your copy in a folder with its name, for example <code>yourtheme\/print-packing-slips-invoices\/compact\/<\/code>.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Each template receives two arrays: <code>$doc<\/code> with the document&#8217;s data (title, addresses, items) and <code>$shop<\/code> with the shop details from the plugin settings (company name, address, logo).<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><code>print_packing_slips_invoices_template_path<\/code> (filter)<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Chooses another template file, for example one shipped by your own plugin.<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table><thead><tr><th>Parameter<\/th><th>Type<\/th><th>Description<\/th><\/tr><\/thead><tbody><tr><td><code>$path<\/code><\/td><td><code>string<\/code><\/td><td>Absolute path to the template<\/td><\/tr><tr><td><code>$template<\/code><\/td><td><code>string<\/code><\/td><td>Template slug: <code>minimal<\/code>, <code>classic<\/code> or <code>compact<\/code><\/td><\/tr><tr><td><code>$type<\/code><\/td><td><code>string<\/code><\/td><td>Document type: <code>packing-slip<\/code> or <code>invoice<\/code><\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">Print buttons from your own plugin<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Check that the plugin is active with <code>function_exists()<\/code> first. There is no dependency in either direction.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><code>print_packing_slips_invoices_url( $order_ids, $type = &#x27;packing-slip&#x27; )<\/code><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Returns the URL of the print page for one or more orders, or <code>&#x27;&#x27;<\/code> if the current user may not print. Escape it with <code>esc_url()<\/code>.<\/p>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p class=\"wp-block-paragraph\"><strong>Note:<\/strong> an invoice link creates the invoice, and uses an invoice number, the first time it is opened.<\/p>\n<\/blockquote>\n\n\n\n<pre class=\"wp-block-code\"><code>if ( function_exists( &#039;print_packing_slips_invoices_url&#039; ) ) {\n\t$url = print_packing_slips_invoices_url( $order-&gt;get_id() );\n\tif ( $url ) {\n\t\tprintf( &#039;&lt;a class=&quot;button&quot; href=&quot;\/en\/%s\/&quot; target=&quot;_blank&quot;&gt;%s&lt;\/a&gt;&#039;, esc_url( $url ), esc_html__( &#039;Packing slip&#039;, &#039;my-plugin&#039; ) );\n\t}\n}<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\"><code>print_packing_slips_invoices_invoice_number( $order )<\/code><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Returns the order&#8217;s invoice number, or <code>&#x27;&#x27;<\/code> if no invoice has been created.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Events and data<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\"><code>print_packing_slips_invoices_loaded<\/code> (action)<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Fires when the plugin is ready. The public functions above are available from here on.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><code>print_packing_slips_invoices_invoice_created<\/code> (action)<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Fires after an invoice has been created. Use it to send the invoice to an accounting system.<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table><thead><tr><th>Parameter<\/th><th>Type<\/th><th>Description<\/th><\/tr><\/thead><tbody><tr><td><code>$snapshot<\/code><\/td><td><code>array<\/code><\/td><td>The invoice data as it was stored, including the number<\/td><\/tr><tr><td><code>$order<\/code><\/td><td><code>WC_Order<\/code><\/td><td>The order<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">The snapshot is fixed when the invoice is created. Later changes to the order do not change the invoice.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><code>print_packing_slips_invoices_buyer_vat_number<\/code> (filter)<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Changes the buyer&#8217;s VAT number printed on the invoice, for example when your checkout stores it in a custom field.<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table><thead><tr><th>Parameter<\/th><th>Type<\/th><th>Description<\/th><\/tr><\/thead><tbody><tr><td><code>$value<\/code><\/td><td><code>string<\/code><\/td><td>The VAT number<\/td><\/tr><tr><td><code>$order<\/code><\/td><td><code>WC_Order<\/code><\/td><td>The order<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<pre class=\"wp-block-code\"><code>add_filter( &#x27;print_packing_slips_invoices_buyer_vat_number&#x27;, function ( string $value, WC_Order $order ) {\n\treturn $value ?: (string) $order-&gt;get_meta( &#x27;_billing_vat_number&#x27; );\n}, 10, 2 );<\/code><\/pre>","protected":false},"excerpt":{"rendered":"<p>You can change how documents look, add your own print buttons and use invoice data in other systems. Your own template Copy a template into your theme and change it there. The plugin uses your copy automatically. Document Copy from To Packing slip templates\/minimal\/packing-slip.php yourtheme\/print-packing-slips-invoices\/minimal\/packing-slip.php Invoice templates\/minimal\/invoice.php yourtheme\/print-packing-slips-invoices\/minimal\/invoice.php The templates Classic and Compact use the [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":90005,"menu_order":650,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-90009","page","type-page","status-publish","hentry"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v28.9 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>North Packing Slips &amp; Invoices hooks - North Creative Collective<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/northcreativecollective.se\/en\/docs\/developers\/packing-slips\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"North Packing Slips &amp; Invoices hooks - North Creative Collective\" \/>\n<meta property=\"og:description\" content=\"You can change how documents look, add your own print buttons and use invoice data in other systems. Your own template Copy a template into your theme and change it there. The plugin uses your copy automatically. Document Copy from To Packing slip templates\/minimal\/packing-slip.php yourtheme\/print-packing-slips-invoices\/minimal\/packing-slip.php Invoice templates\/minimal\/invoice.php yourtheme\/print-packing-slips-invoices\/minimal\/invoice.php The templates Classic and Compact use the [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/northcreativecollective.se\/en\/docs\/developers\/packing-slips\/\" \/>\n<meta property=\"og:site_name\" content=\"North Creative Collective\" \/>\n<meta property=\"article:modified_time\" content=\"2026-11-28T10:12:11+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/northcreativecollective.se\/wp-content\/uploads\/2026\/11\/north-architecture-1024x683.png\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data1\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/northcreativecollective.se\\\/docs\\\/developers\\\/packing-slips\\\/\",\"url\":\"https:\\\/\\\/northcreativecollective.se\\\/docs\\\/developers\\\/packing-slips\\\/\",\"name\":\"North Packing Slips & Invoices hooks - North Creative Collective\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/northcreativecollective.se\\\/#website\"},\"datePublished\":\"2026-11-18T21:11:04+00:00\",\"dateModified\":\"2026-11-28T10:12:11+00:00\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/northcreativecollective.se\\\/docs\\\/developers\\\/packing-slips\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/northcreativecollective.se\\\/docs\\\/developers\\\/packing-slips\\\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/northcreativecollective.se\\\/docs\\\/developers\\\/packing-slips\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Hem\",\"item\":\"https:\\\/\\\/northcreativecollective.se\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"North-pluginerna \u2013 anv\u00e4ndarguide\",\"item\":\"https:\\\/\\\/northcreativecollective.se\\\/docs\\\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Developer documentation\",\"item\":\"https:\\\/\\\/northcreativecollective.se\\\/docs\\\/developers\\\/\"},{\"@type\":\"ListItem\",\"position\":4,\"name\":\"North Packing Slips &#038; Invoices hooks\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/northcreativecollective.se\\\/#website\",\"url\":\"https:\\\/\\\/northcreativecollective.se\\\/\",\"name\":\"North Creative Collective\",\"description\":\"Ett kreativt kollektiv f\u00f6r moderna varum\u00e4rken och projekt\",\"publisher\":{\"@id\":\"https:\\\/\\\/northcreativecollective.se\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/northcreativecollective.se\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/northcreativecollective.se\\\/#organization\",\"name\":\"North Creative Collective\",\"url\":\"https:\\\/\\\/northcreativecollective.se\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/northcreativecollective.se\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/northcreativecollective.se\\\/wp-content\\\/uploads\\\/2026\\\/10\\\/logo.png\",\"contentUrl\":\"https:\\\/\\\/northcreativecollective.se\\\/wp-content\\\/uploads\\\/2026\\\/10\\\/logo.png\",\"width\":1774,\"height\":887,\"caption\":\"North Creative Collective\"},\"image\":{\"@id\":\"https:\\\/\\\/northcreativecollective.se\\\/#\\\/schema\\\/logo\\\/image\\\/\"}}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"North Packing Slips & Invoices hooks - North Creative Collective","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:\/\/northcreativecollective.se\/en\/docs\/developers\/packing-slips\/","og_locale":"en_US","og_type":"article","og_title":"North Packing Slips & Invoices hooks - North Creative Collective","og_description":"You can change how documents look, add your own print buttons and use invoice data in other systems. Your own template Copy a template into your theme and change it there. The plugin uses your copy automatically. Document Copy from To Packing slip templates\/minimal\/packing-slip.php yourtheme\/print-packing-slips-invoices\/minimal\/packing-slip.php Invoice templates\/minimal\/invoice.php yourtheme\/print-packing-slips-invoices\/minimal\/invoice.php The templates Classic and Compact use the [&hellip;]","og_url":"https:\/\/northcreativecollective.se\/en\/docs\/developers\/packing-slips\/","og_site_name":"North Creative Collective","article_modified_time":"2026-11-28T10:12:11+00:00","og_image":[{"url":"https:\/\/northcreativecollective.se\/wp-content\/uploads\/2026\/11\/north-architecture-1024x683.png","type":"","width":"","height":""}],"twitter_card":"summary_large_image","twitter_misc":{"Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/northcreativecollective.se\/docs\/developers\/packing-slips\/","url":"https:\/\/northcreativecollective.se\/docs\/developers\/packing-slips\/","name":"North Packing Slips & Invoices hooks - North Creative Collective","isPartOf":{"@id":"https:\/\/northcreativecollective.se\/#website"},"datePublished":"2026-11-18T21:11:04+00:00","dateModified":"2026-11-28T10:12:11+00:00","breadcrumb":{"@id":"https:\/\/northcreativecollective.se\/docs\/developers\/packing-slips\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/northcreativecollective.se\/docs\/developers\/packing-slips\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/northcreativecollective.se\/docs\/developers\/packing-slips\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Hem","item":"https:\/\/northcreativecollective.se\/"},{"@type":"ListItem","position":2,"name":"North-pluginerna \u2013 anv\u00e4ndarguide","item":"https:\/\/northcreativecollective.se\/docs\/"},{"@type":"ListItem","position":3,"name":"Developer documentation","item":"https:\/\/northcreativecollective.se\/docs\/developers\/"},{"@type":"ListItem","position":4,"name":"North Packing Slips &#038; Invoices hooks"}]},{"@type":"WebSite","@id":"https:\/\/northcreativecollective.se\/#website","url":"https:\/\/northcreativecollective.se\/","name":"North Creative Collective","description":"Ett kreativt kollektiv f\u00f6r moderna varum\u00e4rken och projekt","publisher":{"@id":"https:\/\/northcreativecollective.se\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/northcreativecollective.se\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/northcreativecollective.se\/#organization","name":"North Creative Collective","url":"https:\/\/northcreativecollective.se\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/northcreativecollective.se\/#\/schema\/logo\/image\/","url":"https:\/\/northcreativecollective.se\/wp-content\/uploads\/2026\/10\/logo.png","contentUrl":"https:\/\/northcreativecollective.se\/wp-content\/uploads\/2026\/10\/logo.png","width":1774,"height":887,"caption":"North Creative Collective"},"image":{"@id":"https:\/\/northcreativecollective.se\/#\/schema\/logo\/image\/"}}]}},"_links":{"self":[{"href":"https:\/\/northcreativecollective.se\/en\/wp-json\/wp\/v2\/pages\/90009","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/northcreativecollective.se\/en\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/northcreativecollective.se\/en\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/northcreativecollective.se\/en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/northcreativecollective.se\/en\/wp-json\/wp\/v2\/comments?post=90009"}],"version-history":[{"count":1,"href":"https:\/\/northcreativecollective.se\/en\/wp-json\/wp\/v2\/pages\/90009\/revisions"}],"predecessor-version":[{"id":90038,"href":"https:\/\/northcreativecollective.se\/en\/wp-json\/wp\/v2\/pages\/90009\/revisions\/90038"}],"up":[{"embeddable":true,"href":"https:\/\/northcreativecollective.se\/en\/wp-json\/wp\/v2\/pages\/90005"}],"wp:attachment":[{"href":"https:\/\/northcreativecollective.se\/en\/wp-json\/wp\/v2\/media?parent=90009"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}