• Resolved callli007

    (@callli007)


    Hi,
    i am looking for a way to add an extra text line when a customer is ordering VAT free, from a third party country (outside the EU). The german law requires to add additional information on the invoice saying “this invoice is VAT free because it is shipped outside the EU”

    Is there a way to add a condition to the text block when the invoice is free of taxes?

Viewing 3 replies - 1 through 3 (of 3 total)
  • 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

    Thread Starter callli007

    (@callli007)

    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.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Additional information when VAT free’ is closed to new replies.