Fixed undefined $meta[id]

This commit is contained in:
Claudio Sanches 2017-02-16 01:42:47 -02:00
parent 036a2f6c92
commit 75b2661ba3
2 changed files with 4 additions and 4 deletions

View File

@ -309,7 +309,7 @@ class WC_API_Customers extends WC_API_Resource {
if ( is_callable( array( $customer, "set_billing_{$field}" ) ) ) {
$customer->{"set_billing_{$field}"}( $data['billing_address'][ $field ] );
} else {
$customer->update_meta_data( 'billing_' . $field, wc_clean( $data['billing_address'][ $field ] ), $meta['id'] );
$customer->update_meta_data( 'billing_' . $field, wc_clean( $data['billing_address'][ $field ] ) );
}
}
}
@ -322,7 +322,7 @@ class WC_API_Customers extends WC_API_Resource {
if ( is_callable( array( $customer, "set_shipping_{$field}" ) ) ) {
$customer->{"set_shipping_{$field}"}( $data['shipping_address'][ $field ] );
} else {
$customer->update_meta_data( 'shipping_' . $field, wc_clean( $data['shipping_address'][ $field ] ), $meta['id'] );
$customer->update_meta_data( 'shipping_' . $field, wc_clean( $data['shipping_address'][ $field ] ) );
}
}
}

View File

@ -310,7 +310,7 @@ class WC_API_Customers extends WC_API_Resource {
if ( is_callable( array( $customer, "set_billing_{$field}" ) ) ) {
$customer->{"set_billing_{$field}"}( $data['billing_address'][ $field ] );
} else {
$customer->update_meta_data( 'billing_' . $field, wc_clean( $data['billing_address'][ $field ] ), $meta['id'] );
$customer->update_meta_data( 'billing_' . $field, wc_clean( $data['billing_address'][ $field ] ) );
}
}
}
@ -323,7 +323,7 @@ class WC_API_Customers extends WC_API_Resource {
if ( is_callable( array( $customer, "set_shipping_{$field}" ) ) ) {
$customer->{"set_shipping_{$field}"}( $data['shipping_address'][ $field ] );
} else {
$customer->update_meta_data( 'shipping_' . $field, wc_clean( $data['shipping_address'][ $field ] ), $meta['id'] );
$customer->update_meta_data( 'shipping_' . $field, wc_clean( $data['shipping_address'][ $field ] ) );
}
}
}