Code Duplication    Length = 9-10 lines in 2 locations

includes/admin/meta-boxes/class-wc-meta-box-product-data.php 1 location

@@ 1204-1213 (lines=10) @@
1201
		}
1202
1203
		// Product url
1204
		if ( 'external' == $product_type ) {
1205
1206
			if ( isset( $_POST['_product_url'] ) ) {
1207
				update_post_meta( $post_id, '_product_url', esc_url_raw( $_POST['_product_url'] ) );
1208
			}
1209
1210
			if ( isset( $_POST['_button_text'] ) ) {
1211
				update_post_meta( $post_id, '_button_text', wc_clean( $_POST['_button_text'] ) );
1212
			}
1213
		}
1214
1215
		// Save variations
1216
		if ( 'variable' == $product_type ) {

includes/cli/class-wc-cli-product.php 1 location

@@ 1494-1502 (lines=9) @@
1491
		}
1492
1493
		// Product url
1494
		if ( $product_type == 'external' ) {
1495
			if ( isset( $data['product_url'] ) ) {
1496
				update_post_meta( $product_id, '_product_url', wc_clean( $data['product_url'] ) );
1497
			}
1498
1499
			if ( isset( $data['button_text'] ) ) {
1500
				update_post_meta( $product_id, '_button_text', wc_clean( $data['button_text'] ) );
1501
			}
1502
		}
1503
1504
		// Reviews allowed
1505
		if ( isset( $data['reviews_allowed'] ) ) {