admin管理员组文章数量:1430682
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.
本文标签: Stop WooCommerce from updating useruser meta after checkout
版权声明:本文标题:Stop WooCommerce from updating useruser meta after checkout 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1745529905a2662011.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论