Skip to content

Commit

Permalink
Get search parameters from WooCommerce queries
Browse files Browse the repository at this point in the history
  • Loading branch information
felipeelia committed Feb 28, 2022
1 parent ba2bf85 commit 384cdbc
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions includes/classes/Feature/WooCommerce/WooCommerce.php
Original file line number Diff line number Diff line change
Expand Up @@ -370,6 +370,15 @@ public function translate_args( $query ) {
$query->query['suppress_filters'] = false;
$query->set( 'suppress_filters', false );

// Integrate with WooCommerce custom searches as well
$search = $query->get( 'search' );
if ( ! empty( $search ) ) {
$s = $search;
$query->set( 's', $s );
} else {
$s = $query->get( 's' );
}

$query->query_vars['ep_integrate'] = true;
$query->query['ep_integrate'] = true;

Expand Down

0 comments on commit 384cdbc

Please sign in to comment.