{"id":18847205,"date":"2026-03-10T20:00:52","date_gmt":"2026-03-10T20:00:52","guid":{"rendered":"https:\/\/wordpress.org\/support\/topic\/limited-information-available-when-customizing-packing-list\/"},"modified":"2026-03-10T20:00:52","modified_gmt":"2026-03-10T20:00:52","slug":"limited-information-available-when-customizing-packing-list","status":"publish","type":"topic","link":"https:\/\/wordpress.org\/support\/topic\/limited-information-available-when-customizing-packing-list\/","title":{"rendered":"Limited information available when customizing packing list"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">We&#8217;re using <code>wcshipping_packing_list_html<\/code> to filter the contents of the packing slip you can generate with this plugin. However, from that filter, you only have access to the HTML and the order ID.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Looking in the packing slip generation logic, there is information leveraged that can&#8217;t be obtained from the order ID without using the Loader class from this plugin. For example, information about shipments or labels purchased. That information is used to generate the original HTML, but I can&#8217;t access it from my filter. The Loader class is not registered as a singleton, so I can&#8217;t get a copy of it. It loads a huge number of instances of other classes, all weirdly codependent, that would be helpful in creating our own HTML.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">At a minimum, could that Loader be registered using a singleton pattern so we can grab the instance from our own code?<\/p>\n","protected":false},"template":"","class_list":["post-18847205","topic","type-topic","status-publish","hentry"],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/18847205","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\/18847205\/revisions"}],"wp:attachment":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/media?parent=18847205"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}