Plugin Contributor
Ewout
(@pomegranate)
You can use an action hook for this, based on one of the examples in the action hook documentation (here).
This probably does what you need:
add_action( 'wpo_wcpdf_after_order_details', 'wpo_wcpdf_ex_eu_text', 10, 2 );
function wpo_wcpdf_ex_eu_text ($template_type, $order) {
$is_ex_eu_vat = !in_array( $order->get_billing_country(), WC()->countries->get_european_union_countries( 'eu_vat' ) );
$is_financial = $template_type !== 'packing-slip';
if ( $is_ex_eu_vat && $is_financial ) {
?>
<div class="ex-eu-text">this invoice is VAT free because it is shipped outside the EU.</div>
<?php
}
}
If you haven’t worked with code snippets (actions/filters) or functions.php before, read this guide: How to use filters
Thank you! This works great for me!
Is it possible to add a specific adress (Street X, City Y, Germany) inside of Germany to the list of countries that will get the message?
We offer a service where you can send your package to the german army headquarter which ist also VAT free.
Plugin Contributor
Ewout
(@pomegranate)
Technically, that is certainly possible, but that’s a bit beyond the scope of free support. A web developer with some experience with WooCommerce should be able to do that for you without too much trouble though, especially with the above example as a reference.