If none of the built in PDF layouts are what you are looking for then there are two solutions for your own custom PDF template.
First option: code your own template in PHP.
Print products PDF
Therefore you can use one of the two filters:
- woocommerce_print_products_product_html
- woocommerce_print_products_product_final_html
Print Posts Plugin
- wordpress_print_posts_html
Then you need to return HTML code in your custom coded functions. An example:
add_filter('woocommerce_print_products_product_final_html', 'we_custom_pdf_template', 20, 3); function we_custom_pdf_template($html, $productId, $data) { $product = wc_get_product($productId); if(!$product) { return; } $html = 'My Test'; return $html; }
2nd option: contact our customization service
Therefore please send us an email to su*****@we******.io including the following information:
- desired template (PDF mockup)
- information where what data is coming from (best you comment that in the PDF template)
- make sure you mark custom data fields / ACF fields correctly
Send your request to su*****@we******.io. Then we can give you a quote.
Hey, this hook use the example for woocommerce_print_products_product and not wordpress_print_posts, could you explain how to create a custom template and give the right hook for with wordpress_print_posts ?
Thanks,
In the FAQ it says you can use “wordpress_print_posts_html” filter. This one is correct.
Thanks for your reply. I don’t manage to add the hook specify above in my function.php. It creates a critical error. I can design my own HTML template but I don’t understand how to connect it with this hook. What is “My test” ? Could you do a step-by-step guide to at least use your hook ?
Is this a special support to ask about clarifying your FAQ ? If yes well i will renew it. Thanks a lot
For plugin support issues please submit a ticket on our website.
I would like my product display based on the SKU number order. Can pdf catalog able to do that? Or I need to write specific code to achieve that? Thank you
Well currently not, but we can customize / add this feature for you on Charge. Contact us at su*****@we******.io
How do I add custom fields to the PDF please?
Custom fields can be enabled in our plugin settings.
Why doesn’t “pos.” automatically sort, it can only display the number 1
In which folder of my theme do I need to place an override template file of the woocommerce-pdf-catalog/class-woocommerce-pdf-catalog-product-templates.php?