Hi @hypostatic,
If you only want to customize that unique string, I think the best way to achieve it is using this code snippet:
/**
* PDF Invoices & Packing Slips for WooCommerce:
* Customize labels on the PDF documents
*/
add_filter( 'wpo_wcpdf_html_filters', function( $filters ) {
$filters[] = array( 'gettext', 'wpo_wcpdf_customize_string_translation', 999, 3 );
return $filters;
}, 10, 1 );
function wpo_wcpdf_customize_string_translation( $translation, $text, $domain ) {
if ( $domain == 'woocommerce-pdf-invoices-packing-slips' ) {
switch ( $text ) {
// Repeat as many cases as strings you want to translate
case 'Notes':
$translation = 'Serial Number';
break;
}
}
return $translation;
}
I recommend using the code snippet above to translate only a few of strings, but for more than 10 strings, it’s better using a plugin like Loco Translate.