Hello @derschutze
Please add the following code snippet to your theme functions.php file:
add_action( 'wpo_wcpdf_before_customer_notes', 'wpo_wcpdf_check_show_custom_message_outside_eu', 10, 2 );
function wpo_wcpdf_check_show_custom_message_outside_eu( $document_type, $order )
{
if( !empty($order) && $document_type == 'invoice' ) {
$eu_countries = !empty(WC()->countries) && is_callable( array( WC()->countries, 'get_european_union_countries' ) ) ? WC()->countries->get_european_union_countries('eu_vat') : null;
if( !is_null($eu_countries) && !in_array($order->get_billing_country(), $eu_countries) ) {
echo '<div><strong>TAXFREE EXPORT</strong></div>';
}
}
}
If you never worked with actions/filters please read our documentation page: How to use filters