Code Duplication    Length = 7-7 lines in 2 locations

includes/api/class-wc-rest-customers-controller.php 2 locations

@@ 592-598 (lines=7) @@
589
		}
590
591
		// Customer billing address.
592
		if ( isset( $request['billing_address'] ) ) {
593
			foreach ( array_keys( $schema['properties']['billing_address']['properties'] ) as $address ) {
594
				if ( isset( $request['billing_address'][ $address ] ) ) {
595
					update_user_meta( $customer->ID, 'billing_' . $address, wc_clean( $request['billing_address'][ $address ] ) );
596
				}
597
			}
598
		}
599
600
		// Customer shipping address.
601
		if ( isset( $request['shipping_address'] ) ) {
@@ 601-607 (lines=7) @@
598
		}
599
600
		// Customer shipping address.
601
		if ( isset( $request['shipping_address'] ) ) {
602
			foreach ( array_keys( $schema['properties']['shipping_address']['properties'] ) as $address ) {
603
				if ( isset( $request['shipping_address'][ $address ] ) ) {
604
					update_user_meta( $customer->ID, 'shipping_' . $address, wc_clean( $request['shipping_address'][ $address ] ) );
605
				}
606
			}
607
		}
608
	}
609
610
	/**