Customers have billing/shipping addresses saved to their account and when they checkout they are presented with the billing/shipping address fields. If they update them in the checkout and confirm their order, this also updates their addresses on their account. I understand this is the expected behaviour but not what our site requires.
I want to still show the address fields on the checkout but don't want it to update their account once it is being processed, but I also need the addresses they enter during checkout to be attached to the order meta, so the addresses on the order/order meta match those that they entered during checkout.
Is this possible? I've tried looking for hooks or how to programatically approach this but all I can find is how to add additional meta fields to an order which is not what I want.
Customers have billing/shipping addresses saved to their account and when they checkout they are presented with the billing/shipping address fields. If they update them in the checkout and confirm their order, this also updates their addresses on their account. I understand this is the expected behaviour but not what our site requires.
I want to still show the address fields on the checkout but don't want it to update their account once it is being processed, but I also need the addresses they enter during checkout to be attached to the order meta, so the addresses on the order/order meta match those that they entered during checkout.
Is this possible? I've tried looking for hooks or how to programatically approach this but all I can find is how to add additional meta fields to an order which is not what I want.
Share Improve this question asked May 2, 2019 at 16:25 no.no. 1331 gold badge1 silver badge5 bronze badges1 Answer
Reset to default 3To avoid user registration data to be updated each time an order is placed use the following:
add_filter( 'woocommerce_checkout_update_customer_data', '__return_false' );
Code goes in function.php file of your active child theme (or active theme). Tested and works.