Skip to content

Commit

Permalink
Merge pull request #14 from rbayet/fix_keep_ES6_compatibility
Browse files Browse the repository at this point in the history
Percolate request - keep ES6 compatibility
  • Loading branch information
rbayet authored Sep 1, 2020
2 parents 2d3fa99 + 173f0db commit 0d0e710
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions Model/Percolator.php
Original file line number Diff line number Diff line change
Expand Up @@ -120,13 +120,10 @@ public function getMatchingRuleIds($productId, $storeId = null)
$percolatorQuery['percolate'] = [
'field' => '_targetrule.query',
'index' => $containerConfig->getIndexName(),
'type' => '_doc',
'id' => $productId,
];

if (method_exists($containerConfig, 'getTypeName')) {
$percolatorQuery['percolate']['type'] = $containerConfig->getTypeName();
}

$percolatorFilter['query']['bool']['must'] = [
['term' => ['_targetrule.percolator_type' => PercolatorData::PERCOLATOR_TYPE]],
// Also done in \Magento\TargetRule\Model\Index::getRuleCollection
Expand Down

0 comments on commit 0d0e710

Please sign in to comment.