Code Duplication    Length = 10-10 lines in 2 locations

includes/admin/meta-boxes/class-wc-meta-box-order-data.php 2 locations

@@ 434-443 (lines=10) @@
431
			$customer_changed = true;
432
		}
433
434
		if ( ! empty( self::$billing_fields ) ) {
435
			foreach ( self::$billing_fields as $key => $field ) {
436
				if ( ! isset( $field['id'] ) ){
437
					$field['id'] = '_billing_' . $key;
438
				}
439
				if ( update_post_meta( $post_id, $field['id'], wc_clean( $_POST[ $field['id'] ] ) ) ) {
440
					$customer_changed = true;
441
				}
442
			}
443
		}
444
445
		if ( ! empty( self::$shipping_fields ) ) {
446
			foreach ( self::$shipping_fields as $key => $field ) {
@@ 445-454 (lines=10) @@
442
			}
443
		}
444
445
		if ( ! empty( self::$shipping_fields ) ) {
446
			foreach ( self::$shipping_fields as $key => $field ) {
447
				if ( ! isset( $field['id'] ) ){
448
					$field['id'] = '_shipping_' . $key;
449
				}
450
				if ( update_post_meta( $post_id, $field['id'], wc_clean( $_POST[ $field['id'] ] ) ) ) {
451
					$customer_changed = true;
452
				}
453
			}
454
		}
455
456
		if ( isset( $_POST['_transaction_id'] ) ) {
457
			update_post_meta( $post_id, '_transaction_id', wc_clean( $_POST[ '_transaction_id' ] ) );