Hi @keeslamper,
Try with this code snippet:
/**
* PDF Invoices & Packing Slips for WooCommerce:
* Show the footer only for specific products in the order
*/
add_filter( 'wpo_wcpdf_footer_settings_text', function( $footer, $document ) {
$products_ids = array( 123, 321 ); // Enter here the product IDs separated by commas
if ( $order = $document->order ) {
foreach( $order->get_items() as $item_id => $item ) {
if ( in_array( absint( $item['variation_id'] ), $products_ids ) || in_array( absint( $item['product_id'] ), $products_ids ) ) {
return $footer;
}
}
}
return;
}, 10, 2 );
If you haven’t worked with code snippets (actions/filters) or functions.php
before, read this guide: How to use filters