Skip to content

Commit

Permalink
Fix actionValidateOrder.md
Browse files Browse the repository at this point in the history
Fix example code
  • Loading branch information
andreapozza committed Feb 27, 2024
1 parent 8ef1dbe commit de1b3a0
Showing 1 changed file with 1 addition and 1 deletion.
Expand Up @@ -66,7 +66,7 @@ class MyModuleRewardCustomerWhenOrder extends Module
{
$orderObject = $params['order'];
$customerObject = $params['customer'];
$hasValidParams = Validate::isLoadedObject($orderObject) && Validate::isLoadedObject($orderObject);
$hasValidParams = Validate::isLoadedObject($orderObject) && Validate::isLoadedObject($customerObject);
if ($hasValidParams && !$this->customerAlreadyRewarded((int) $customerObject->id)) {
$hasConfiguredState = in_array((int) $orderObject->getCurrentState(), $this->getConfuredOrdersStatesIds());
$hasCustomerRequiredNbrOfTheOrderToReward = $this->getCustomerValidOrdersNbr((int) $customerObject->id) == $this->getRequiredNbrOfTheOrderToReward();
Expand Down

0 comments on commit de1b3a0

Please sign in to comment.