CodeExplorer matchesReleaseDate example
public function match(RuleScope
$scope): bool
{ try { $ruleValue =
$this->
buildDate($this->lineItemReleaseDate
);
} catch (\Exception
) { return false;
} if ($scope instanceof LineItemScope
) { return $this->
matchesReleaseDate($scope->
getLineItem(),
$ruleValue);
} if (!
$scope instanceof CartRuleScope
) { return false;
} foreach ($scope->
getCart()->
getLineItems()->
filterGoodsFlat() as $lineItem) { if ($this->
matchesReleaseDate($lineItem,
$ruleValue)) { return true;
} }