Formatting

This commit is contained in:
claudiulodro 2017-05-09 14:55:39 -07:00
parent 93835f69db
commit 5d86b2f001
2 changed files with 5 additions and 5 deletions

View File

@ -208,7 +208,7 @@ class WC_Data_Store_WP {
'meta_query' => array(), 'meta_query' => array(),
); );
foreach( $query_vars as $key => $value ) { foreach ( $query_vars as $key => $value ) {
if ( in_array( $value, $skipped_values, true ) || 'meta_query' === $key ) { if ( in_array( $value, $skipped_values, true ) || 'meta_query' === $key ) {
continue; continue;
} }
@ -222,7 +222,7 @@ class WC_Data_Store_WP {
); );
// Other vars get mapped to wp_query args or just left alone. // Other vars get mapped to wp_query args or just left alone.
} else { } else {
$key_mapping = array ( $key_mapping = array(
'parent' => 'post_parent', 'parent' => 'post_parent',
'parent_exclude' => 'post_parent__not_in', 'parent_exclude' => 'post_parent__not_in',
'exclude' => 'post__not_in', 'exclude' => 'post__not_in',
@ -315,7 +315,7 @@ class WC_Data_Store_WP {
$query_arg['after']['minute'] = $end_date->date( 'i' ); $query_arg['after']['minute'] = $end_date->date( 'i' );
$query_arg['after']['second'] = $end_date->date( 's' ); $query_arg['after']['second'] = $end_date->date( 's' );
} }
} elseif( '<' == $operator || '<=' == $operator ) { } elseif ( '<' == $operator || '<=' == $operator ) {
$query_arg['before'] = array( $query_arg['before'] = array(
'year' => $end_date->date( 'Y' ), 'year' => $end_date->date( 'Y' ),
'month' => $end_date->date( 'n' ), 'month' => $end_date->date( 'n' ),
@ -325,7 +325,7 @@ class WC_Data_Store_WP {
$query_arg['before']['minute'] = $end_date->date( 'i' ); $query_arg['before']['minute'] = $end_date->date( 'i' );
$query_arg['before']['second'] = $end_date->date( 's' ); $query_arg['before']['second'] = $end_date->date( 's' );
} }
} elseif( '...' == $operator ) { } elseif ( '...' == $operator ) {
$query_arg['after'] = array( $query_arg['after'] = array(
'year' => $start_date->date( 'Y' ), 'year' => $start_date->date( 'Y' ),
'month' => $start_date->date( 'n' ), 'month' => $start_date->date( 'n' ),

View File

@ -649,7 +649,7 @@ class WC_Order_Data_Store_CPT extends Abstract_WC_Order_Data_Store_CPT implement
'status' => 'post_status', 'status' => 'post_status',
); );
foreach( $key_mapping as $query_key => $db_key ) { foreach ( $key_mapping as $query_key => $db_key ) {
if ( isset( $query_vars[ $query_key ] ) ) { if ( isset( $query_vars[ $query_key ] ) ) {
$query_vars[ $db_key ] = $query_vars[ $query_key ]; $query_vars[ $db_key ] = $query_vars[ $query_key ];
unset( $query_vars[ $query_key ] ); unset( $query_vars[ $query_key ] );