I’m making a wordpress woocommerce run website which i’m building to store VAT Numbers, and make it so that a user and admin can edit it when needed.
I’m using the official woocommerce eu vat plugin – http://www.woothemes.com/products/eu-vat-number/ which stores the VAT number to the user meta. I’ve successfully used ACF to display this field in the backend and the front end of woocommerce, but i’m having trouble updating the user meta after checkout.
For example;
If the user had 12456 as a VAT number already stored, then went onto the checkout and decided they wanted to use another one, so they changed the field from 12456 to 999999 and then checked out, I want the plugin to update the stored VAT Number.
I’ve got this to work in the backend admin, but can’t get it to work at checkout.
The code i’ve used on the backend is
update_user_meta($user_id,'VAT Number', $_POST['VAT_Number']);
1 comment