sashasint
Forum Replies Created
-
That did it for packing lists too. Thanks again!
This fixed it!!! Thanks! If I may ask, why was that extra information showing up in the invoice? Will this carry over to the packing list as well?
- This reply was modified 9 months, 2 weeks ago by sashasint.
Thank you for your reply. To confirm, can I use the Code Snippets Plugin and call the new Snippet:
PDF Invoices & Packing Slip for WooCommerce: * Unset specific item meta data from PDF invoices
Then in the Code for the snippet I enter in what you posted above:
/add_filter( ‘wpo_wcpdf_html_filters’, function( $filters, $document ) { if ( ‘invoice’ === $document->get_type() ) { $filters[] = array( ‘woocommerce_order_item_get_formatted_meta_data’, ‘wpo_remove_specific_item_meta_from_pdf_documents’, 999, 2 ); } return $filters;}, 10, 2 );function wpo_remove_specific_item_meta_from_pdf_documents( $formatted_meta, $item ){ foreach( $formatted_meta as $key => $meta ){ $meta_data_to_unset = array( ‘method_id’, ‘instance_id’, ‘cost’, ‘total_tax’, ); if ( in_array( $meta->key, $meta_data_to_unset ) ) { unset( $formatted_meta[$key] ); } } return $formatted_meta;}
Is this correct? Thank you in advance for your help!
Above is a dropbox link to the image. I couldn’t figure out how to post the image directly into this window.
Thank you! I just wanted to let you know this worked. I changed the maximum execution to 20 and that fixed the problem with the fatal error. Then changing the scan time to 4 hours (14400 seconds) allowed the scan to completely run without timing out.