Code Duplication    Length = 3-3 lines in 2 locations

includes/class-wc-coupon.php 2 locations

@@ 644-646 (lines=3) @@
641
		$product_ids  = array( $product->id, ( isset( $product->variation_id ) ? $product->variation_id : 0 ), $product->get_parent() );
642
643
		// Specific products get the discount
644
		if ( sizeof( $this->product_ids ) && sizeof( array_intersect( $product_ids, $this->product_ids ) ) ) {
645
			$valid = true;
646
		}
647
648
		// Category discounts
649
		if ( sizeof( $this->product_categories ) && sizeof( array_intersect( $product_cats, $this->product_categories ) ) ) {
@@ 659-661 (lines=3) @@
656
		}
657
658
		// Specific product ID's excluded from the discount
659
		if ( sizeof( $this->exclude_product_ids ) && sizeof( array_intersect( $product_ids, $this->exclude_product_ids ) ) ) {
660
			$valid = false;
661
		}
662
663
		// Specific categories excluded from the discount
664
		if ( sizeof( $this->exclude_product_categories ) && sizeof( array_intersect( $product_cats, $this->exclude_product_categories ) ) ) {