• Resolved derschutze

    (@derschutze)


    Hello,

    my request is basic, I only need an additional text “TAXFREE EXPORT” for all invoices outside of Europe/all invoices with no TAX. Is there a option or code for that?

    Thanks in advance

    • This topic was modified 4 years, 3 months ago by derschutze.
Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Contributor alexmigf

    (@alexmigf)

    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

    Thread Starter derschutze

    (@derschutze)

    Thanks

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Need Text added to all invoices outside of Europe’ is closed to new replies.