| @@ 677-685 (lines=9) @@ | ||
| 674 | 'no_found_rows' => 1 |
|
| 675 | ); |
|
| 676 | ||
| 677 | if ( isset( $atts['sku'] ) ) { |
|
| 678 | $args['meta_query'][] = array( |
|
| 679 | 'key' => '_sku', |
|
| 680 | 'value' => sanitize_text_field( $atts['sku'] ), |
|
| 681 | 'compare' => '=' |
|
| 682 | ); |
|
| 683 | ||
| 684 | $args['post_type'] = array( 'product', 'product_variation' ); |
|
| 685 | } |
|
| 686 | ||
| 687 | if ( isset( $atts['id'] ) ) { |
|
| 688 | $args['p'] = absint( $atts['id'] ); |
|
| @@ 1791-1799 (lines=9) @@ | ||
| 1788 | } elseif ( in_array( $typenow, wc_get_order_types( 'order-meta-boxes' ) ) ) { |
|
| 1789 | ||
| 1790 | // Filter the orders by the posted customer. |
|
| 1791 | if ( isset( $_GET['_customer_user'] ) && $_GET['_customer_user'] > 0 ) { |
|
| 1792 | $vars['meta_query'] = array( |
|
| 1793 | array( |
|
| 1794 | 'key' => '_customer_user', |
|
| 1795 | 'value' => (int) $_GET['_customer_user'], |
|
| 1796 | 'compare' => '=' |
|
| 1797 | ) |
|
| 1798 | ); |
|
| 1799 | } |
|
| 1800 | ||
| 1801 | // Sorting |
|
| 1802 | if ( isset( $vars['orderby'] ) ) { |
|