Skip to content
This repository has been archived by the owner on Feb 23, 2024. It is now read-only.

Commit

Permalink
disable phcs rules on top of the file
Browse files Browse the repository at this point in the history
  • Loading branch information
gigitux committed Oct 27, 2022
1 parent e2cefcc commit 064d814
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/BlockTypes/ProductQuery.php
Original file line number Diff line number Diff line change
Expand Up @@ -175,9 +175,9 @@ function( $acc, $query ) {
* @return array
*/
private function merge_queries( $query1, $query2 ) {
$query1['post__in'] = isset( $query2['post__in'] ) ? $this->intersect_arrays_when_not_empty( $query1['post__in'], $query2['post__in'] ) : $query1['post__in'];
$query1['meta_query'] = isset( $query2['meta_query'] ) ? array_merge( $query1['meta_query'], array( $query2['meta_query'] ) ) : $query1['meta_query'];
$query1['tax_query'] = isset( $query2['tax_query'] ) ? array_merge( $query1['tax_query'], array( $query2['tax_query'] ) ) : $query1['tax_query'];
$query1['post__in'] = ( isset( $query2['post__in'] ) && ! empty( $query2['post__in'] ) ) ? $this->intersect_arrays_when_not_empty( $query1['post__in'], $query2['post__in'] ) : $query1['post__in'];
$query1['meta_query'] = ( isset( $query2['meta_query'] ) && ! empty( $query2['meta_query'] ) ) ? array_merge( $query1['meta_query'], array( $query2['meta_query'] ) ) : $query1['meta_query'];
$query1['tax_query'] = ( isset( $query2['tax_query'] ) && ! empty( $query2['tax_query'] ) ) ? array_merge( $query1['tax_query'], array( $query2['tax_query'] ) ) : $query1['tax_query'];

return $query1;

Expand Down

0 comments on commit 064d814

Please sign in to comment.