Code Duplication    Length = 7-7 lines in 2 locations

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

@@ 568-574 (lines=7) @@
565
		}
566
567
		// Customer billing address.
568
		if ( isset( $request['billing_address'] ) ) {
569
			foreach ( array_keys( $schema['properties']['billing_address']['properties'] ) as $address ) {
570
				if ( isset( $request['billing_address'][ $address ] ) ) {
571
					update_user_meta( $customer->ID, 'billing_' . $address, wc_clean( $request['billing_address'][ $address ] ) );
572
				}
573
			}
574
		}
575
576
		// Customer shipping address.
577
		if ( isset( $request['shipping_address'] ) ) {
@@ 577-583 (lines=7) @@
574
		}
575
576
		// Customer shipping address.
577
		if ( isset( $request['shipping_address'] ) ) {
578
			foreach ( array_keys( $schema['properties']['shipping_address']['properties'] ) as $address ) {
579
				if ( isset( $request['shipping_address'][ $address ] ) ) {
580
					update_user_meta( $customer->ID, 'shipping_' . $address, wc_clean( $request['shipping_address'][ $address ] ) );
581
				}
582
			}
583
		}
584
	}
585
586
	/**