How can we improve WooCommerce?

Company ID / VAT ID to be stored in customer account

Currently Woocommerce does not store store company ID or EU VAT ID in customer user account. ID is stored only in individual order in custom fields.

The problem arises when creating new order for customer through the admin site: ID must be searched from old orders and filled manually and then calculate also VAT tax manually as automatic "Calculate taxes" button will give invalid result regardless of VAT ID copied to custom fields.

This is a must-have primitive feature in e-commerce platform.

123 votes
Vote
Sign in
(thinking…)
Password icon
Signed in as (Sign out)
You have left! (?) (thinking…)
Anonymous shared this idea  ·   ·  Flag idea as inappropriate…  ·  Admin →

17 comments

Sign in
(thinking…)
Password icon
Signed in as (Sign out)
Submitting...
  • Anonymous commented  ·   ·  Flag as inappropriate

    I must have in EU and other countries. I just found out that its not included. In Prestashop its standard.

  • sosoluis commented  ·   ·  Flag as inappropriate

    This an absolutely need in a shop. Ever there be a bill, and a bill need Tax ID. This is a priority!

  • Anonymous commented  ·   ·  Flag as inappropriate

    Yes, this is essential and unavoidable for users of your plugin in the European Community.

  • Jens commented  ·   ·  Flag as inappropriate

    I agree. This feature totally makes sense.
    For a quick fix, you can simply add it to the user meta with the following functions:

    add_action( 'woocommerce_customer_save_address', 'pp_customer_save_address');
    function pp_customer_save_address ($user_id) {
    update_user_meta( $user_id, 'vat_number', htmlentities($_POST['vat_number']) );
    }

    add_action('woocommerce_checkout_update_user_meta', 'pp_custom_checkout_update_user_meta');
    function pp_custom_checkout_update_user_meta( $user_id ) {
    if ($user_id && $_POST['vat_number']) {
    update_user_meta( $user_id, 'vat_number', esc_attr($_POST['vat_number']) );
    }
    }

    Additionally, you should show the field in the admin panel and include it into the billing address - at least that's what I did.

  • Ed commented  ·   ·  Flag as inappropriate

    VAT ID is also needed for Customs Export documents as well as the clients customs broker on record. Having to look up this info for every order is slow, adds potential for error and delays in export due to missing or incorrect info. Would be a greatly appreciated.

  • Adri Oosterwijk commented  ·   ·  Flag as inappropriate

    Yes! I want this as well. It must be simple. The VAT numbers are stored in the table: wp_postmeta
    meta_key: vat_number
    meta_value: (the vat number)
    So why not store it in the customer table as well...? Please be quick with it.

WooCommerce: Category - Extension Ideas

Feedback and Knowledge Base