Code Duplication    Length = 3-3 lines in 2 locations

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

@@ 1115-1117 (lines=3) @@
1112
		}
1113
1114
		// Featured Product
1115
		if ( isset( $data['featured'] ) ) {
1116
			update_post_meta( $product_id, '_featured', ( $this->is_true( $data['featured'] ) ) ? 'yes' : 'no' );
1117
		}
1118
1119
		// Shipping data
1120
		$this->save_product_shipping_data( $product_id, $data );

includes/api/class-wc-rest-products-controller.php 1 location

@@ 941-943 (lines=3) @@
938
		}
939
940
		// Featured Product.
941
		if ( isset( $request['featured'] ) ) {
942
			update_post_meta( $product->id, '_featured', true === $request['featured'] ? 'yes' : 'no' );
943
		}
944
945
		// Shipping data.
946
		$this->save_product_shipping_data( $product, $request );