Code Duplication    Length = 9-9 lines in 2 locations

includes/admin/class-wc-admin-post-types.php 1 location

@@ 1787-1795 (lines=9) @@
1784
		} elseif ( in_array( $typenow, wc_get_order_types( 'order-meta-boxes' ) ) ) {
1785
1786
			// Filter the orders by the posted customer.
1787
			if ( isset( $_GET['_customer_user'] ) && $_GET['_customer_user'] > 0 ) {
1788
				$vars['meta_query'] = array(
1789
					array(
1790
						'key'   => '_customer_user',
1791
						'value' => (int) $_GET['_customer_user'],
1792
						'compare' => '='
1793
					)
1794
				);
1795
			}
1796
1797
			// Sorting
1798
			if ( isset( $vars['orderby'] ) ) {

includes/class-wc-shortcodes.php 1 location

@@ 663-671 (lines=9) @@
660
			'no_found_rows'       => 1
661
		);
662
663
		if ( isset( $atts['sku'] ) ) {
664
			$args['meta_query'][] = array(
665
				'key'     => '_sku',
666
				'value'   => sanitize_text_field( $atts['sku'] ),
667
				'compare' => '='
668
			);
669
670
			$args['post_type'] = array( 'product', 'product_variation' );
671
		}
672
673
		if ( isset( $atts['id'] ) ) {
674
			$args['p'] = absint( $atts['id'] );