Update user meta for billing fields
This commit is contained in:
parent
5a1cc2362e
commit
e29c67b6bc
|
@ -187,9 +187,13 @@ class WC_Checkout {
|
||||||
|
|
||||||
// Store user data
|
// Store user data
|
||||||
if ( $this->checkout_fields['billing'] )
|
if ( $this->checkout_fields['billing'] )
|
||||||
foreach ( $this->checkout_fields['billing'] as $key => $field )
|
foreach ( $this->checkout_fields['billing'] as $key => $field ) {
|
||||||
update_post_meta( $order_id, '_' . $key, $this->posted[ $key ] );
|
update_post_meta( $order_id, '_' . $key, $this->posted[ $key ] );
|
||||||
|
|
||||||
|
if ( $this->customer_id )
|
||||||
|
update_user_meta( $this->customer_id, $key, $this->posted[ $key ] );
|
||||||
|
}
|
||||||
|
|
||||||
if ( $this->checkout_fields['shipping'] && $woocommerce->cart->needs_shipping() ) {
|
if ( $this->checkout_fields['shipping'] && $woocommerce->cart->needs_shipping() ) {
|
||||||
foreach ( $this->checkout_fields['shipping'] as $key => $field ) {
|
foreach ( $this->checkout_fields['shipping'] as $key => $field ) {
|
||||||
$postvalue = false;
|
$postvalue = false;
|
||||||
|
|
Loading…
Reference in New Issue