RemotePortInOrder
GitHub - magesuite/remote-port-in-order
This module adds remote port to IP in OrderData.
Installation
This module is part of MageSuite metapackage
Installation if metapackage is not used:
composer require "creativestyle/magesuite-remote-port-in-order" ^1.0.0
Admin settings
No admin setting in this module.
Backend
Backend documentation need to be added
public function aroundSetRemoteIp(\Magento\Sales\Model\Order $subject, callable $proceed, $remoteIp)
{
$remotePort = $this->request->getServer('REMOTE_PORT');
if ($remoteIp !== null && !preg_match('/(\d[\d.]+):(\d+)\b/', $remoteIp) && !empty($remotePort)) {
$remoteIp = sprintf('%s:%s', $remoteIp, $remotePort);
}
return $proceed($remoteIp);
}
Frontend
No frontend functionalities in the module.