Hi Andreu,
What you describe will require some custom code. If you’re looking to remove the prefix from the VAT number stored against the order, that value is saved in the post meta, as well as the user meta table, with meta key vat_number
. The value is stored in event woocommerce_checkout_update_order_meta
for orders, and woocommerce_checkout_update_user_meta
for users.
We don’t have an example of how to remove the country prefix, as that’s not something that we planned to do. In your custom code, you could either remove the prefix from the meta stored in the database, or leave the stored data intact and remove the prefix after you load it from the database.
If you choose to remove the prefix from the database, we would recommend to test the site thoroughly, as you would be altering data that the EU VAT Assistant might expect to be in a specific format (i.e. with the prefix). This scenario, as well as the custom code to handle it, has not been tested, and it’s not officially supported.