Couple requested changes
This commit is contained in:
parent
d9c5536cf2
commit
cec2c3b7dc
|
@ -624,7 +624,7 @@ class WC_Order_Data_Store_CPT extends Abstract_WC_Order_Data_Store_CPT implement
|
|||
}
|
||||
}
|
||||
|
||||
if ( isset( $query_vars['customer'] ) && '' !== $query_vars['customer'] ) {
|
||||
if ( isset( $query_vars['customer'] ) && ! empty( $query_vars['customer'] ) ) {
|
||||
$values = is_array( $query_vars['customer'] ) ? $query_vars['customer'] : array( $query_vars['customer'] );
|
||||
$wp_query_args['meta_query'][] = $this->get_orders_generate_customer_meta_query( $values );
|
||||
}
|
||||
|
|
|
@ -51,7 +51,7 @@ function wc_get_orders( $args ) {
|
|||
$datetime = wc_string_to_datetime( $args['date_before'] );
|
||||
$date_before = strpos( $args['date_before'], ':' ) ? $datetime->getOffsetTimestamp() : $datetime->date( 'Y-m-d' );
|
||||
}
|
||||
if ( ! empty ( $args['date_after'] ) ) {
|
||||
if ( ! empty( $args['date_after'] ) ) {
|
||||
$datetime = wc_string_to_datetime( $args['date_after'] );
|
||||
$date_after = strpos( $args['date_after'], ':' ) ? $datetime->getOffsetTimestamp() : $datetime->date( 'Y-m-d' );
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue