diff --git a/Model/Event/Strategy/OrderCompleted.php b/Model/Event/Strategy/OrderCompleted.php index 11fb655..0c8d5ea 100644 --- a/Model/Event/Strategy/OrderCompleted.php +++ b/Model/Event/Strategy/OrderCompleted.php @@ -34,7 +34,9 @@ public function build() if(array_key_exists('updated_at', $context)) { $data['created_at'] = $context['updated_at']; } - $data['env_remote_ip'] = $context['remote_ip']; + if (isset($context['remote_ip'])){ + $data['env_remote_ip'] = $context['remote_ip']; + } $eventData = array( 'type' => 'sale', 'increment_id' => $context['increment_id'] @@ -43,4 +45,4 @@ public function build() } return $data; } -} \ No newline at end of file +}