Viewing 8 replies - 1 through 8 (of 8 total)
  • Hi @gilesytheking

    EU VAT number can be added to the invoice with help of a code snippet.

    Please leave a support query here for more help.

    Thread Starter gilesytheking

    (@gilesytheking)

    code snippet? Do you have an example? Maybe some hooks or filters I can use?

    Thread Starter gilesytheking

    (@gilesytheking)

    received a response via support ticket for this issue. For anyone else who wishes to add VAT number to invoice using EU VAT Number by Woocommerce here is the code

    add_filter( 'wf_pklist_modify_order_date', 'wf_add_vat_number_in_invoice',10,3 );
     function wf_add_vat_number_in_invoice($order_date, $order, $action)
     {  
    
       $vatnumber='VAT Number:' . get_post_meta((WC()->version < '2.7.0') ? $order->id : $order->get_id(),'_vat_number',true);
       return $order_date.'<br/>'.$vatnumber;
     }
    

    Hi @gilesytheking,

    Let us know if any query.

    Hi Support,

    I have the same problem.

    – Is the snippet @gilesytheking shared still up-to-date?
    – Where should this snippet be inserted?

    Thank you in advance for your help.

    Best,

    Luca

    Plugin Author WebToffee

    (@webtoffee)

    Hi @lucaspanjaard,

    Please copy the code snippet to your active theme’s functions.php.

    Hi @webtoffee,

    Thank you for your quick reply.

    I’ve added the snippet to my theme’s child theme functions.php and also tried the parent theme functions.php, but the VAT number doesn’t show up.

    Will the VAT number be displayed on future invoices, but not on current ones?

    Best,

    Luca

    Plugin Author WebToffee

    (@webtoffee)

    Hi @lucaspanjaard,

    The provided snippet will work only if you are using the EU VAT Number by Woocommerce (https://woocommerce.com/products/eu-vat-number/). They store the data under meta key _vat_number. If you are sure that you are using the same plugin, kindly reach us via support so that we can check this further.

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Add VAT Number to invoice’ is closed to new replies.