Code Duplication    Length = 3-3 lines in 3 locations

includes/api/class-wc-rest-coupons-controller.php 3 locations

@@ 360-362 (lines=3) @@
357
			update_post_meta( $post->ID, 'coupon_amount', wc_format_decimal( $request['amount'] ) );
358
		}
359
360
		if ( isset( $request['individual_use'] ) ) {
361
			update_post_meta( $post->ID, 'individual_use', ( true === $request['individual_use'] ) ? 'yes' : 'no' );
362
		}
363
364
		if ( isset( $request['product_ids'] ) ) {
365
			update_post_meta( $post->ID, 'product_ids', implode( ',', array_filter( array_map( 'intval', $request['product_ids'] ) ) ) );
@@ 392-394 (lines=3) @@
389
			update_post_meta( $post->ID, 'expiry_date', $this->get_coupon_expiry_date( wc_clean( $request['expiry_date'] ) ) );
390
		}
391
392
		if ( isset( $request['free_shipping'] ) ) {
393
			update_post_meta( $post->ID, 'free_shipping', ( true === $request['free_shipping'] ) ? 'yes' : 'no' );
394
		}
395
396
		if ( isset( $request['product_categories'] ) ) {
397
			update_post_meta( $post->ID, 'product_categories', array_filter( array_map( 'intval', $request['product_categories'] ) ) );
@@ 404-406 (lines=3) @@
401
			update_post_meta( $post->ID, 'exclude_product_categories', array_filter( array_map( 'intval', $request['excluded_product_categories'] ) ) );
402
		}
403
404
		if ( isset( $request['exclude_sale_items'] ) ) {
405
			update_post_meta( $post->ID, 'exclude_sale_items', ( true === $request['exclude_sale_items'] ) ? 'yes' : 'no' );
406
		}
407
408
		if ( isset( $request['minimum_amount'] ) ) {
409
			update_post_meta( $post->ID, 'minimum_amount', wc_format_decimal( $request['minimum_amount'] ) );