Hi @atar1,
Yes, there is! You can achieve what you describe with the following code snippet:
/**
* PDF Invoices & Packing Slips for WooCommerce:
* Adds custom styles to the PDF documents
*/
add_action( 'wpo_wcpdf_custom_styles', function( $document_type, $document ) {
?>
/* Hide the packing slip header and footer */
.packing-slip table.head.container,
.packing-slip #footer {
visibility: hidden;
}
<?php
}, 10, 2 );
If you haven’t worked with code snippets (actions/filters) or functions.php
before, read this guide: How to use filters
Please note that I have also added the footer selector (.packing-slip #footer
), but feel free to remove it, if you only want to hide the packing slip header (do not forget to remove the comma of the previous line, if you do so).
Thread Starter
Atar1
(@atar1)
Hello @yordansoares
Thank you for helping with my issue.
I tried your code using the “Snippets” Plugin. However the Packing Slip now does not get displayed at all. Only the Black bar from the table gets displayed. Am I doing something wrong?
Thank you for your help.
Thread Starter
Atar1
(@atar1)
Hello @yordansoares again
It seemed to be a Problem with the Plugin itself on my local Testsite. I resolved the Problem and the Code is now working as intended. Thanks again and sorry for the hustle.
Hi @atar1,
I’m glad to hear that you managed to solve the issue with the plugin, and the code snippet is working!
If you don’t mind and have the time, do you think you could leave us a review?
Thanks in advance and all the best with your store!