Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Diego

    (@daigo75)

    The VAT number of a client, if valid, is added to customer’s billing address. Thanks to that, it’s displayed automatically on the My Account page, as well as on the PDF invoices. Here’s an example of an invoice generated by the PDF Invoices & Packing Slips plugin you mentioned: https://snipboard.io/gzeMHv.jpg

    If that value doesn’t appear, perhaps there’s another plugin, or some code, altering the billing address, removing the VAT number. Going by exclusion, disabling one plugin at a time (except WooCommerce and the Aelia ones) can help identifying the possible source of the conflict.

    Technical information
    The EU VAT Assistant uses a filter for hook woocommerce_order_formatted_billing_address to add the VAT number to the billing address. We would suggest to check your plugins, as well as the theme, to see if there might some code running a similar filter and removing the VAT number, either deliberately, or accidentally. If that’s indeed the case, its authors should be able to tweak the code so that they preserve the VAT number field, which will then appear on the invoice.

    Thread Starter cvanbrummelen

    (@cvanbrummelen)

    Diego,

    Thanks for your reply! I checked the plugins and it is the My Parcel plugin that is using the same filter. I will check with the creator of that plugin if he can change something.

    When I need more help I will let you know.

    Thanks so far.

    Plugin Author Diego

    (@daigo75)

    Thanks for the information, we will take note of that.

    If the authors of the My Parcel plugin need technical information, the EU VAT Assistant modifies the billing address with the following function:

    
    public function woocommerce_order_formatted_billing_address($address_parts, $order) {
      $order = new Order(aelia_get_order_id($order));
      $address_parts['vat_number'] = $order->get_customer_vat_number();
      return $address_parts;
    }
    

    All it does is adding the “vat_number” field to the list, taking it from the order. Filters that run after this operation, and which need to alter the billing address would just have to focus on the “core” fields, which WooCommerce passes to the filter by default, and leave additional fields untouched.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘[Question] Invoice show Tax number’ is closed to new replies.