Hi @blogjunkie,
To achieve what you want, please add this code snippet to your site:
/**
* WooCommerce PDF Invoices & Packing Slips:
* Hide 'Ship To' heading if the shipping method is 'Local pickup'
*/
add_action( 'wpo_wcpdf_custom_styles', function( $document_type, $document ) {
if ( $document_type == 'invoice' && ( $shipping_methods = $document->order->get_shipping_methods() ) ) {
// Check shipping methods
if ( $shipping_methods ) {
$first_method = array_shift( $shipping_methods );
$shipping_method_id = $first_method->get_method_id();
}
if ( $shipping_method_id == 'local_pickup' ) {
?>
.shipping-address h3 {
display: none;
}
<?php
}
}
}, 10, 2 );
If you haven’t worked with code snippets (actions/filters) or functions.php
before, read this guide: How to use filters
Let me know if it worked!