![]() Server : Apache System : Linux server2.corals.io 4.18.0-348.2.1.el8_5.x86_64 #1 SMP Mon Nov 15 09:17:08 EST 2021 x86_64 User : corals ( 1002) PHP Version : 7.4.33 Disable Function : exec,passthru,shell_exec,system Directory : /home/corals/old/vendor/extmag/dhlshipping2/Plugin/Controller/Adminhtml/ShipperAccount/ |
<?php /** * Copyright © Extmag. All rights reserved. */ namespace Extmag\DhlShipping\Plugin\Controller\Adminhtml\ShipperAccount; class Save { /** * Adding dhl_signature to signature in result * * @param \Extmag\Shiplab\Controller\Adminhtml\ShipperAccount\Save $subject * @param array $result * @param array $data * @return array */ public function afterCustomCheckData( \Extmag\Shiplab\Controller\Adminhtml\ShipperAccount\Save $subject, array $result, array $data ) { if ($result['carrier_code'] === 'dhl') { if (isset($result['dhl_signature']) && is_array($result['dhl_signature']) && empty($result['dhl_signature']['delete']) ) { if (isset($result['dhl_signature'][0]['name'])) { $result['signature'] = json_encode($result['dhl_signature']); } else { unset($result['signature']); } } else { $result['signature'] = ''; } } return $result; } }