Wordpress 等でのPHPのマルウェア・ウィルス・改ざんコードをデコードして難読化をオンラインで解除し、
元の読みやすいコードに戻し解読できます。
<?php declare(strict_types=1); namespace OneTeamSoftware\WC\Shipping; use OneTeamSoftware\Logger\LoggerInterface; use OneTeamSoftware\WP\Admin\Notices\Notices; class AdminOrders { private $id; private $pluginPath; private $settings; private $version; private $notices; private $logger; private $weightUnit; private $dimensionUnit; private $didScriptsEnqueue; public function __construct(string $hsNwz, string $OJCn7, LoggerInterface $w8Mi0, array $QUiBf = [], string $CHbxS = null) { $this->id = $hsNwz; $this->pluginPath = $OJCn7; $this->settings = array_merge(["\144\145\x66\141\x75\154\164\123\150\x69\x70\x6d\145\x6e\x74\x44\x65\163\143\x72\151\160\164\x69\157\156" => '', "\x65\x6e\x61\x62\x6c\145\x42\165\154\x6b\x53\150\x69\160\x6d\145\x6e\x74\x43\162\145\x61\x74\x69\x6f\156" => "\156\x6f", "\165\x73\145\x53\145\x72\x76\151\143\145\x53\x65\164\x74\151\x6e\147\163\106\x6f\x72\x42\x75\x6c\x6b\x53\x68\151\x70\x6d\145\156\x74\103\x72\145\141\164\x69\157\x6e" => "\x6e\x6f", "\162\145\161\165\x69\162\x65\124\157\102\x75\154\153\103\162\145\141\x74\145\123\x68\151\x70\155\x65\x6e\164\x73" => "\171\145\163", "\x72\x65\161\165\x69\x72\x65\x54\157\102\165\x6c\153\x50\x75\162\x63\150\141\x73\145\120\x6f\163\164\141\x67\145" => "\x79\145\163", "\162\145\x71\165\151\162\x65\124\157\x42\165\x6c\153\120\165\x72\x63\150\141\163\x65\116\x65\x77\120\157\163\x74\x61\147\145" => "\x6e\x6f", "\145\x6e\x61\142\x6c\x65\123\x65\x72\166\x69\143\145\x73" => "\x79\x65\x73", "\x77\145\x69\147\150\x74\x5f\165\x6e\x69\164" => "\x67", "\144\151\155\x65\x6e\163\151\x6f\156\137\x75\x6e\151\x74" => "\x6d\155"], $QUiBf); $this->version = $CHbxS; $this->notices = new Notices($this->id . "\x5f\x61\144\155\151\156\x5f\157\162\x64\x65\x72\163"); $this->logger = $w8Mi0; $this->weightUnit = $this->settings["\x77\x65\x69\x67\150\164\x5f\165\x6e\151\164"]; $this->dimensionUnit = $this->settings["\144\151\155\x65\156\163\151\x6f\x6e\137\x75\x6e\151\164"]; $this->didScriptsEnqueue = false; } public function register(): void { add_filter("\142\165\x6c\x6b\x5f\141\x63\x74\151\157\156\x73\55\x65\x64\151\x74\55\x73\x68\x6f\x70\137\157\x72\x64\145\162", [$this, "\x6f\x6e\x41\144\x64\x42\165\x6c\153\101\143\x74\x69\157\x6e\163"]); add_filter("\x6d\x61\156\141\x67\x65\137\163\x68\x6f\x70\137\157\162\x64\x65\162\137\x70\157\163\x74\x73\137\143\157\x6c\165\155\156\x73", [$this, "\157\x6e\101\x64\144\103\x6f\x6c\x75\x6d\156\x73"], 100); add_action("\155\141\156\141\x67\145\137\163\x68\x6f\160\137\x6f\x72\144\x65\x72\x5f\160\x6f\163\x74\x73\x5f\x63\165\x73\x74\157\x6d\137\x63\157\154\165\x6d\x6e", [$this, "\x6f\x6e\x44\x69\x73\x70\154\141\171\x43\x6f\154\x75\155\156"]); add_action("\x77\160\x5f\141\152\x61\x78\137" . $this->id . "\x5f\143\162\x65\141\164\x65\x53\150\x69\160\155\x65\156\164\163", [$this, "\x6f\156\x43\162\x65\x61\164\x65\123\x68\151\160\x6d\145\x6e\164\163"]); add_action("\167\x70\137\x61\x6a\x61\170\137" . $this->id . "\137\x62\x75\x79\x53\150\151\160\155\145\x6e\x74\x73", [$this, "\157\x6e\102\x75\x79\x53\150\151\x70\x6d\145\156\164\x73"]); add_action("\167\x70\137\141\x6a\141\170\x5f" . $this->id . "\137\144\x6f\x77\156\x6c\x6f\x61\144", [$this, "\x6f\156\104\157\167\156\x6c\x6f\x61\x64"]); add_action("\167\x70\x5f\141\152\141\x78\x5f" . $this->id . "\x5f\x75\x70\144\x61\164\145\x4f\x72\144\x65\162\163", [$this, "\157\x6e\x55\160\x64\x61\164\x65\117\162\144\145\x72\163"]); add_action($this->id . "\137\x41\x64\155\151\x6e\x4f\162\144\x65\162\x73\137\144\x69\x73\160\154\x61\171\117\x72\x64\145\x72\123\150\151\x70\155\x65\x6e\x74\163", [$this, "\144\151\163\x70\x6c\x61\171\x4f\162\144\145\x72\123\x68\x69\160\155\x65\156\164\x73"], 1, 1); } public function setSettings(array $QUiBf): void { if (false === empty($QUiBf)) { $this->settings = array_replace_recursive($this->settings, $QUiBf); } } public function enqueueScripts(array $QUiBf = []): void { if ($this->didScriptsEnqueue) { return; } $this->didScriptsEnqueue = true; $d0aXd = "\x6d\x69\x6e\56\143\x73\x73"; $cvEsg = "\x6d\x69\156\56\x6a\x73"; if (defined("\127\120\x5f\x44\105\102\x55\x47") && WP_DEBUG) { $d0aXd = "\143\x73\x73"; $cvEsg = "\x6a\163"; } wp_register_script($this->id . "\x2d\x6c\141\142\x65\154\x6c\157\x61\144\x65\x72\x70\141\x67\x65", plugins_url("\141\163\x73\145\x74\163\57\152\x73\57\x4c\x61\142\145\154\114\157\x61\x64\145\162\x50\141\x67\145\56" . $cvEsg, str_replace("\x70\x68\x61\x72\x3a\x2f\57", '', $this->pluginPath)), ["\x6a\x71\165\145\x72\x79", "\152\161\165\145\x72\171\55\142\x6c\157\x63\x6b\165\x69"], $this->version); wp_enqueue_script($this->id . "\55\154\x61\x62\x65\154\154\157\x61\x64\x65\x72\160\x61\147\x65"); wp_register_style($this->id . "\x2d\141\x64\x6d\x69\x6e\x6f\162\144\145\162\x73", plugins_url("\x61\163\x73\x65\164\x73\57\143\163\163\57\101\x64\x6d\151\x6e\x4f\162\x64\145\x72\x73\x2e" . $d0aXd, str_replace("\160\x68\141\x72\x3a\x2f\57", '', $this->pluginPath)), [], $this->version); wp_register_script($this->id . "\55\141\144\x6d\x69\156\157\162\x64\145\x72\x73", plugins_url("\x61\x73\x73\x65\164\163\57\x6a\163\57\x41\x64\155\x69\x6e\x4f\162\144\x65\x72\163\56" . $cvEsg, str_replace("\x70\150\x61\x72\72\57\x2f", '', $this->pluginPath)), ["\152\x71\165\x65\x72\171", "\x6a\x71\x75\x65\162\171\55\x62\154\x6f\143\153\x75\151"], $this->version); wp_localize_script($this->id . "\55\x61\144\x6d\x69\156\x6f\162\x64\145\162\163", "\x61\144\155\151\156\157\x72\144\x65\x72\x73\x5f\x73\145\x74\x74\151\156\147\163", $QUiBf); wp_enqueue_script($this->id . "\x2d\x61\144\155\151\x6e\157\162\x64\x65\162\163"); wp_enqueue_style($this->id . "\x2d\x61\x64\x6d\x69\x6e\157\x72\144\x65\x72\163"); } public function onUpdateOrders(): void { $PTfgT = $this->getRequestedOrders(); if (empty($PTfgT)) { exit; } $this->logger->debug(__FILE__, 192, "\x6f\x6e\125\160\144\141\x74\x65\x4f\x72\x64\x65\162\163\x3a\x20\x25\163", print_r($PTfgT, true)); foreach ($PTfgT as $iKfxj => $jPxXW) { do_action($this->id . "\x5f\x73\x65\164\x4f\x72\x64\x65\x72\x53\150\x69\160\155\x65\x6e\164\x4d\145\x74\141", $iKfxj, $jPxXW); bx758: } hdXnP: $xwZhu = apply_filters($this->id . "\137\x67\x65\x74\x45\x72\162\x6f\162\115\x65\163\x73\x61\x67\x65\x73", []); if (empty($xwZhu)) { $this->notices->title = __("\x4f\x72\x64\145\162\40\x68\141\x73\x20\x62\145\x65\x6e\40\x75\x70\x64\141\164\x65\144", $this->id); } else { $this->notices->title = __("\x55\x6e\x61\x62\154\145\x20\x74\157\x20\165\160\144\x61\164\x65\x20\157\x72\144\x65\x72", $this->id); } $this->displayNotices(); exit; } public function onAddBulkActions(array $yXvda): array { if ($this->settings["\145\x6e\x61\x62\154\145\102\x75\x6c\153\x53\150\x69\x70\155\x65\156\x74\x43\x72\x65\141\164\151\157\156"] !== "\171\x65\163") { return $yXvda; } if ($this->mustCreateShipments()) { $yXvda[$this->id . "\x5f\143\x72\145\141\x74\x65\x53\x68\151\160\x6d\x65\x6e\x74\x73"] = sprintf("\x25\x73\x3a\x20\45\x73", apply_filters($this->id . "\x5f\x67\x65\164\x4e\x61\155\145", ''), __("\103\162\145\x61\164\145\x20\x53\150\x69\160\155\145\x6e\x74\x73", $this->id)); } if ($this->mustPurchasePostage()) { $yXvda[$this->id . "\x5f\142\165\171\x53\x68\x69\160\155\145\x6e\x74\x73"] = sprintf("\x25\x73\72\x20\45\x73", apply_filters($this->id . "\137\x67\x65\x74\x4e\141\155\x65", ''), __("\x42\x75\171\x20\123\x68\151\160\160\x69\156\147\40\114\141\142\145\154\x73", $this->id)); } $yXvda[$this->id . "\137\144\157\167\x6e\154\x6f\141\144"] = sprintf("\x25\x73\72\x20\x25\x73", apply_filters($this->id . "\x5f\147\x65\164\x4e\141\155\x65", ''), __("\120\x72\x69\156\x74\40\123\x68\151\160\x70\151\156\147\40\114\141\142\145\154\163\40\141\156\144\x20\x46\157\162\155\x73", $this->id)); return $yXvda; } public function onDownload(): void { $JOVQw = $this->getRequestedOrderIds(); if (empty($JOVQw) || $this->getRequestedAction() !== $this->id . "\x5f\144\157\x77\x6e\154\157\141\144") { return; } $this->logger->debug(__FILE__, 259, "\157\156\x44\157\167\x6e\154\x6f\141\x64\72\40\x25\163", print_r($JOVQw, true)); wc_set_time_limit(0); do_action($this->id . "\137\143\x6c\x65\141\162\x45\x72\x72\157\x72\x4d\x65\163\163\x61\x67\145\x73"); $hWJKz = true; $c40q0 = []; if ($this->mustPurchasePostage()) { $c40q0 = apply_filters($this->id . "\137\147\145\x74\117\162\144\x65\x72\123\x68\x69\x70\x6d\145\156\x74\x73\106\x6f\162\117\x72\x64\x65\x72\x73", [], $JOVQw); } else { $c40q0 = apply_filters($this->id . "\137\x70\165\x72\143\150\x61\163\145\120\157\x73\164\x61\147\x65\x46\x6f\x72\117\x72\144\145\x72\x73", [], $JOVQw, $this->mustCreateShipments(), $this->mustPurchaseNewPostage()); $hWJKz = false === empty($c40q0); } $A0JvM = []; if ($hWJKz) { $A0JvM = apply_filters($this->id . "\x5f\143\x72\145\x61\x74\145\120\x64\146\106\x69\154\145\106\x6f\162\117\x72\x64\x65\x72\x53\x68\151\160\x6d\145\156\164\163", [], $c40q0); } if (isset($A0JvM["\x75\162\x6c"])) { $this->notices->title = sprintf("\x25\x73\x20\74\x61\x20\150\162\x65\x66\75\42\45\x73\x22\40\x74\x61\162\x67\145\164\75\x22\137\142\x6c\x61\156\x6b\42\40\x63\154\x61\163\x73\x3d\x22\x25\163\x20\x70\157\x73\164\141\147\145\114\x61\x62\145\154\163\101\x6e\144\106\157\x72\x6d\163\x22\76\45\x73\74\57\141\76", __("\x53\x68\x69\160\x70\x69\x6e\x67\40\154\141\142\x65\154\163\40\141\x6e\144\x20\x66\157\162\155\x73\x20\x68\x61\x76\145\40\142\x65\x65\x6e\x20\163\165\x63\143\145\163\163\146\x75\154\154\171\x20\x63\x72\x65\x61\164\145\x64\54\x20", $this->id), $A0JvM["\165\x72\x6c"], $this->id, __("\143\154\x69\x63\x6b\x20\150\145\162\145\x20\x74\157\x20\x6f\160\x65\156\40\x69\164", $this->id)); } else { $this->notices->title = __("\x55\156\141\x62\154\x65\40\164\157\40\144\157\x77\156\x6c\157\141\x64\40\x61\x6e\x79\40\x6f\146\x20\x74\x68\x65\40\x73\x68\151\x70\x70\x69\156\x67\40\154\x61\142\145\154\x73\x20\157\162\x20\146\x6f\x72\155\163", $this->id); } $this->displayNotices(); $this->displayOrderShipments($c40q0); exit; } public function onBuyShipments(): void { $JOVQw = $this->getRequestedOrderIds(); if (empty($JOVQw) || $this->getRequestedAction() !== $this->id . "\x5f\x62\165\x79\123\x68\x69\160\155\x65\156\x74\163") { return; } $this->logger->debug(__FILE__, 316, "\157\x6e\x42\165\x79\x53\150\151\x70\155\145\156\x74\163\72\40\x25\x73", print_r($JOVQw, true)); wc_set_time_limit(0); do_action($this->id . "\x5f\143\154\x65\x61\162\105\162\x72\157\x72\115\x65\x73\x73\x61\x67\145\163"); $c40q0 = apply_filters($this->id . "\x5f\160\x75\x72\x63\150\141\163\145\x50\x6f\x73\164\141\x67\145\x46\x6f\162\117\x72\x64\145\x72\x73", [], $JOVQw, $this->mustCreateShipments()); if (false === empty($c40q0)) { $this->notices->title = __("\123\150\151\160\155\145\x6e\164\163\40\150\141\166\145\40\x62\145\x65\x6e\40\x73\165\143\143\x65\x73\x73\146\165\154\154\171\x20\160\165\x72\143\150\141\x73\145\x64", $this->id); } else { $this->notices->title = __("\x45\x72\162\157\x72\x73\40\150\141\166\x65\40\157\x63\x63\x75\x72\162\x65\x64\x20\144\x75\162\151\156\147\40\160\165\x72\143\x68\x61\163\x69\x6e\x67\x20\157\x66\40\x74\150\x65\x20\x73\150\x69\160\x6d\x65\x6e\x74\x73", $this->id); } if (count($c40q0) >= count($JOVQw)) { do_action($this->id . "\x5f\x63\154\145\141\162\105\x72\162\157\x72\115\145\163\x73\x61\147\145\x73"); } $this->displayNotices(); $this->displayOrderShipments($c40q0); exit; } public function onCreateShipments(): void { if (!apply_filters($this->id . "\x5f\x68\x61\163\103\162\145\x61\164\145\x53\150\x69\160\x6d\x65\x6e\164\106\145\x61\x74\x75\162\x65", false)) { return; } $JOVQw = $this->getRequestedOrderIds(); if (empty($JOVQw) || $this->getRequestedAction() !== $this->id . "\x5f\x63\162\145\141\x74\x65\123\x68\x69\160\x6d\x65\156\164\163") { return; } $this->logger->debug(__FILE__, 356, "\157\x6e\x43\162\145\141\164\x65\x53\x68\x69\x70\x6d\145\156\164\x73\x3a\x20\x25\x73", print_r($JOVQw, true)); wc_set_time_limit(0); do_action($this->id . "\x5f\x63\154\x65\x61\x72\x45\162\162\157\x72\115\145\163\163\141\147\145\163"); $c40q0 = apply_filters($this->id . "\x5f\143\162\145\x61\164\145\x53\150\151\x70\x6d\145\156\x74\163\x46\157\x72\117\x72\144\145\162\x73", [], $JOVQw); if (false === empty($c40q0)) { $this->notices->title = __("\x53\x68\x69\160\x6d\x65\x6e\164\163\x20\x68\x61\x76\x65\x20\142\x65\x65\x6e\40\x73\x75\143\x63\145\x73\x73\x66\165\154\154\x79\40\x63\x72\x65\x61\164\145\x64", $this->id); } else { $this->notices->title = __("\105\x72\162\x6f\x72\x73\40\150\141\x76\x65\40\157\143\x63\x75\x72\x72\145\x64\x20\x64\x75\162\x69\156\147\40\x63\x72\x65\x61\164\x69\x6f\156\x20\x6f\x66\x20\x74\150\x65\x20\163\x68\x69\160\x6d\x65\x6e\x74\x73", $this->id); } if (count($c40q0) >= count($JOVQw)) { do_action($this->id . "\x5f\143\154\145\x61\x72\x45\x72\x72\x6f\162\x4d\x65\x73\163\141\x67\x65\x73"); } $this->displayNotices(); $this->displayOrderShipments($c40q0); exit; } public function onAddColumns(array $IFXu1): array { $IFXu1["\163\x68\151\x70\155\145\x6e\x74\137\x74\162\141\x63\x6b\151\156\147"] = __("\x53\x68\151\x70\x6d\x65\156\164\40\124\x72\141\x63\x6b\151\156\147", $this->id); return $IFXu1; } public function onDisplayColumn(string $vh1Mh): void { if ("\x73\150\x69\x70\155\x65\x6e\164\x5f\164\x72\x61\143\x6b\151\156\x67" !== $vh1Mh) { return; } global $post; if (!is_object($post) || !isset($post->ID)) { return; } $iKfxj = $post->ID; $QUiBf = ["\x69\144" => $this->id]; $this->enqueueScripts($QUiBf); $uUHNN = apply_filters($this->id . "\137\147\x65\164\x4f\x72\x64\x65\x72\123\150\x69\160\x6d\x65\x6e\164\163", [], $iKfxj); if (empty($uUHNN)) { if ("\171\x65\x73" === $this->settings["\145\x6e\x61\x62\x6c\145\102\165\154\x6b\123\150\x69\x70\155\145\156\x74\103\x72\x65\x61\x74\151\157\x6e"]) { $this->displayParcels($iKfxj); } } else { $this->displayShipments($iKfxj, $uUHNN); } } public function displayOrderShipments(array $c40q0): void { foreach ($c40q0 as $iKfxj => $uUHNN) { echo sprintf("\x3c\x64\x69\166\40\144\141\x74\x61\x2d\x6f\x72\144\x65\162\137\151\x64\75\42\45\x73\x22\x20\x63\154\x61\x73\163\75\42\x6f\x72\x64\x65\x72\x53\x68\x69\160\x6d\145\x6e\x74\x73\x22\76", $iKfxj); $this->displayShipments($iKfxj, $uUHNN); echo "\x3c\57\x64\151\166\76"; h63ze: } DLViq: } private function getRequestedAction(): string { $kQf22 = ''; if (false === empty($_REQUEST["\141\143\164\151\157\156"]) && $_REQUEST["\x61\143\x74\151\x6f\156"] !== -1) { $kQf22 = $_REQUEST["\x61\x63\164\x69\x6f\156"]; } elseif (false === empty($_REQUEST["\141\143\x74\x69\x6f\156\62"]) && $_REQUEST["\141\x63\164\x69\x6f\156\x32"] !== -1) { $kQf22 = $_REQUEST["\x61\x63\x74\151\x6f\156\x32"]; } return $kQf22; } private function getRequestedOrders(): array { if (!wp_verify_nonce($_POST[$this->id . "\x5f\x6e\x6f\x6e\143\x65"], "\142\165\x6c\153\55\160\157\163\x74\163")) { $this->notices->displayWithoutNotices = true; $this->notices->type = "\145\x72\162\157\162"; $this->notices->title = __("\x53\x65\163\x73\151\x6f\156\x20\x68\141\x73\x20\x65\170\x70\151\162\145\x64\54\40\x70\x6c\145\141\x73\145\40\x72\x65\154\x6f\141\144\x20\160\x61\147\145", $this->id); $this->notices->display(); return []; } if (empty($_POST[$this->id . "\x5f\x6f\162\144\x65\x72\163"]) || !is_array($_POST[$this->id . "\137\157\162\144\x65\x72\163"])) { $this->notices->displayWithoutNotices = true; $this->notices->type = "\145\162\162\x6f\162"; $this->notices->title = __("\111\x6e\166\141\154\x69\x64\x20\151\156\x70\165\164\40\x64\141\x74\x61", $this->id); $this->notices->display(); return []; } $ievNv = ["\x6c\x65\156\x67\x74\x68" => __("\x4c\x65\x6e\147\x74\150", $this->id), "\167\x69\x64\164\150" => __("\x57\151\144\x74\x68", $this->id), "\150\145\x69\147\150\x74" => __("\x48\145\x69\x67\x68\x74", $this->id), "\x77\x65\151\147\x68\164" => __("\x57\x65\151\x67\150\164", $this->id)]; $IAeKJ = apply_filters($this->id . "\137\x67\145\164\x53\145\x72\166\x69\x63\145\x73", []); $IhAd_ = apply_filters($this->id . "\x5f\x67\145\164\x50\141\143\x6b\x61\147\x65\x54\x79\160\x65\163", []); $uhXTf = apply_filters($this->id . "\x5f\147\145\x74\x43\x75\162\x72\x65\x6e\143\151\x65\x73", []); $PTfgT = $_POST[$this->id . "\x5f\x6f\162\144\x65\x72\163"]; foreach ($PTfgT as $YjKHd) { if (empty($YjKHd["\163\x65\x72\x76\x69\143\145"]) || empty($IAeKJ[$YjKHd["\163\145\162\x76\x69\x63\x65"]])) { $this->notices->displayWithoutNotices = true; $this->notices->type = "\145\162\x72\x6f\x72"; $this->notices->title = __("\125\x6e\x6b\x6e\x6f\x77\156\x20\163\145\x72\166\151\143\145", $this->id); $this->notices->display(); return []; } if (empty($YjKHd["\160\141\x72\x63\145\154\163"]) || !is_array($YjKHd["\160\x61\162\x63\145\x6c\x73"])) { $this->notices->displayWithoutNotices = true; $this->notices->type = "\x65\x72\x72\157\x72"; $this->notices->title = __("\x55\156\153\156\157\x77\x6e\x20\x70\141\x72\143\x65\154\x20\151\x6e\x66\x6f\162\x6d\141\164\151\157\156", $this->id); $this->notices->display(); return []; } $yLnBK = $YjKHd["\160\x61\162\143\145\154\x73"]; foreach ($yLnBK as $c7f0s) { foreach ($ievNv as $W7Lfy => $hujAK) { if (!isset($c7f0s[$W7Lfy]) || !is_numeric($c7f0s[$W7Lfy]) || $c7f0s[$W7Lfy] < 0) { $this->notices->displayWithoutNotices = true; $this->notices->type = "\145\x72\x72\157\162"; $this->notices->title = sprintf(__("\x49\156\166\141\154\151\144\x20\x25\x73\x20\x76\141\154\165\145", $this->id), $hujAK); $this->notices->display(); return []; } if (empty($c7f0s["\164\171\x70\x65"]) || empty($IhAd_[$c7f0s["\x74\x79\160\x65"]])) { $this->notices->displayWithoutNotices = true; $this->notices->type = "\x65\x72\162\157\x72"; $this->notices->title = __("\125\156\x6b\156\x6f\x77\156\x20\160\x61\162\x63\145\x6c\x20\x74\x79\x70\x65", $this->id); $this->notices->display(); return []; } if (empty($c7f0s["\x63\165\162\162\145\156\x63\x79"]) || empty($uhXTf[$c7f0s["\143\x75\x72\162\x65\x6e\143\x79"]])) { $this->notices->displayWithoutNotices = true; $this->notices->type = "\x65\162\162\157\162"; $this->notices->title = __("\125\156\x6b\156\x6f\x77\x6e\40\143\165\x72\162\145\x6e\x63\x79", $this->id); $this->notices->display(); return []; } yVokX: } XY8u1: YX2Pm: } kStwd: KTEtz: } xkPb3: return $PTfgT; } private function getRequestedOrderIds(): array { if ($this->settings["\x65\x6e\x61\x62\x6c\x65\x42\165\x6c\x6b\123\150\151\x70\x6d\x65\x6e\x74\103\x72\145\x61\164\151\x6f\x6e"] !== "\x79\x65\163") { return []; } if ($this->getRequestedAction() === '' || empty($_REQUEST["\160\157\x73\164"])) { return []; } if (!wp_verify_nonce($_REQUEST["\137\x77\x70\156\157\156\x63\145"], "\x62\x75\x6c\153\x2d\x70\x6f\x73\x74\163")) { return []; } return array_map("\141\142\163\151\x6e\164", (array) $_REQUEST["\x70\x6f\x73\x74"]); } private function mustCreateShipments(): bool { $Ef2TL = false; if (apply_filters($this->id . "\x5f\150\x61\x73\x43\x72\x65\x61\164\x65\123\150\151\x70\x6d\x65\x6e\x74\x46\145\141\x74\165\162\x65", false)) { $Ef2TL = "\171\x65\163" === $this->settings["\162\x65\x71\165\x69\x72\x65\x54\x6f\x42\x75\x6c\x6b\103\x72\145\x61\164\x65\123\150\151\160\x6d\145\x6e\164\x73"]; } return $Ef2TL; } private function mustPurchasePostage(): bool { return "\x79\145\163" === $this->settings["\x72\x65\161\165\x69\x72\145\124\157\x42\x75\x6c\153\120\x75\162\143\150\x61\x73\145\x50\x6f\x73\x74\x61\x67\x65"]; } private function mustPurchaseNewPostage(): bool { return "\x79\145\163" === $this->settings["\x72\x65\161\x75\x69\162\x65\x54\157\x42\165\154\153\x50\165\x72\x63\x68\x61\163\x65\116\x65\167\120\157\x73\164\141\x67\x65"]; } private function displayNotices(): void { $xwZhu = apply_filters($this->id . "\x5f\x67\145\164\105\162\162\x6f\x72\x4d\145\163\x73\x61\x67\x65\163", []); if (false === empty($xwZhu)) { $this->notices->type = "\145\x72\x72\157\x72"; foreach ($xwZhu as $mPL75) { $this->notices->add($mPL75); pbRCZ: } zrVX7: } else { $this->notices->type = "\165\x70\144\141\164\x65\x64"; } $this->notices->displayWithoutNotices = true; $this->notices->display(); } private function displayParcels(int $iKfxj): void { $yLnBK = []; $jPxXW = apply_filters($this->id . "\137\147\145\164\x4f\162\144\x65\162\x53\150\151\x70\x6d\x65\156\x74\x4d\x65\164\x61", [], $iKfxj); if (empty($jPxXW["\x70\x61\x72\143\145\154\163"])) { return; } $i4ob6 = $jPxXW["\x73\145\x72\x76\x69\x63\x65"]; $yLnBK = $jPxXW["\x70\141\x72\x63\x65\x6c\163"]; $IhAd_ = apply_filters($this->id . "\137\147\x65\x74\120\141\143\x6b\x61\x67\145\124\x79\x70\145\163", []); echo sprintf("\x3c\x64\x69\166\40\143\x6c\141\163\x73\75\42\45\x73\40\141\144\155\x69\x6e\117\x72\144\145\162\163\x22\x3e", $this->id); echo sprintf("\74\144\151\166\x3e\74\163\164\162\157\156\147\x3e\x25\163\74\57\x73\x74\x72\157\x6e\x67\76\x3c\57\x64\151\x76\x3e\x3c\x68\x72\57\76", apply_filters($this->id . "\x5f\x67\x65\x74\116\141\155\x65", '')); echo "\x3c\144\151\x76\76"; echo sprintf("\74\163\x65\x6c\145\x63\164\x20\164\x79\x70\145\75\42\x74\x65\x78\164\x22\40\x6e\141\x6d\145\x3d\42\x25\163\137\157\162\x64\145\162\x73\133\x25\163\x5d\x5b\x73\x65\x72\166\151\x63\145\135\x22\76", $this->id, $iKfxj); $IAeKJ = apply_filters($this->id . "\137\147\x65\164\x53\145\162\166\x69\x63\x65\163", []); $M6r_P = "\171\x65\x73" === $this->settings["\x65\x6e\x61\x62\154\145\123\145\162\x76\151\x63\145\163"]; if (empty($this->settings["\x73\x65\162\x76\151\143\145\x73"])) { $M6r_P = true; } foreach ($IAeKJ as $V9IRd => $HPgCo) { if ("\171\x65\163" === $this->settings["\165\x73\x65\123\x65\162\x76\151\143\x65\x53\145\x74\164\x69\156\147\163\x46\157\162\102\x75\154\153\x53\150\151\160\x6d\145\x6e\x74\x43\162\x65\141\x74\x69\x6f\156"]) { $Li75H = ["\145\x6e\141\x62\154\145\144" => $M6r_P ? "\x79\145\x73" : "\156\x6f"]; if (false === empty($this->settings["\x73\145\162\x76\x69\x63\145\163"][$V9IRd])) { $Li75H = $this->settings["\163\x65\162\x76\x69\x63\145\x73"][$V9IRd]; } if ($Li75H["\x65\156\x61\142\x6c\145\144"] === "\x6e\x6f") { goto eQBVk; } } echo sprintf("\x3c\x6f\x70\x74\151\157\x6e\x20\x76\141\154\165\145\x3d\42\45\x73\x22\40\x25\163\x3e\x25\x73\74\x2f\157\x70\x74\151\157\x6e\76", $V9IRd, $V9IRd === $i4ob6 ? "\x73\145\x6c\x65\143\x74\145\x64" : '', apply_filters($this->id . "\137\163\x65\162\166\151\x63\x65\x5f\x6e\x61\155\x65", $HPgCo, $V9IRd)); eQBVk: } R0ztI: echo "\x3c\57\x73\x65\x6c\x65\143\164\x3e"; echo "\x3c\57\144\x69\x76\76"; foreach ($yLnBK as $yAh7Z => $c7f0s) { $this->displayParcel($iKfxj, $yAh7Z, $c7f0s, $IAeKJ, $IhAd_); rZTog: } gtMFJ: echo sprintf("\x3c\142\x75\x74\164\x6f\x6e\40\x63\154\141\163\x73\x3d\42\165\160\144\141\x74\145\40\x73\x75\x62\x6d\x69\x74\x20\x62\165\164\164\x6f\156\42\x3e\45\x73\74\57\142\165\x74\164\157\156\76", __("\125\x70\144\141\x74\145", $this->id)); echo "\74\57\x64\151\x76\x3e"; } private function displayParcel(int $iKfxj, int $yAh7Z, array $c7f0s, array $IAeKJ, array $IhAd_): void { if (empty($c7f0s)) { return; } if ($yAh7Z > 0) { echo "\74\x68\162\57\76"; } echo sprintf("\74\x64\151\166\76\x3c\x73\164\162\x6f\156\x67\76\45\163\45\163\x3c\x2f\x73\x74\x72\157\156\x67\76\x3c\57\x64\x69\x76\76", __("\120\x61\x72\x63\145\154\40\x23", $this->id), $yAh7Z + 1); echo "\x3c\144\x69\166\76"; $cjrD1 = $this->settings["\x64\x65\x66\141\x75\154\164\123\x68\x69\160\x6d\x65\x6e\x74\104\x65\x73\x63\x72\151\x70\164\151\157\x6e"]; if (false === empty($c7f0s["\x64\145\x73\143\162\x69\x70\x74\151\x6f\156"])) { $cjrD1 = $c7f0s["\x64\145\163\143\162\151\x70\x74\151\x6f\156"]; } echo sprintf("\74\151\156\160\x75\164\x20\164\171\160\x65\x3d\42\x74\x65\170\x74\42\40\143\x6c\141\x73\x73\x3d\42\160\141\143\153\x61\x67\x65\x44\145\x73\x63\162\x69\160\x74\151\x6f\156\42\40\x6e\141\155\x65\x3d\42\x25\163\137\x6f\x72\144\x65\x72\x73\133\x25\x73\x5d\133\x70\141\x72\143\145\154\163\135\x5b\45\x73\135\133\x64\x65\x73\x63\x72\151\x70\x74\151\x6f\156\135\x22\x20\x70\154\141\x63\x65\150\157\x6c\x64\145\162\75\x22\x25\163\42\x20\166\141\x6c\x75\x65\75\42\x25\163\x22\57\76", $this->id, $iKfxj, $yAh7Z, __("\x44\x65\x73\143\x72\151\160\164\x69\x6f\156", $this->id), $cjrD1); echo "\x3c\x2f\144\x69\x76\76"; echo "\74\x64\151\x76\x3e"; echo sprintf("\x3c\x73\145\x6c\x65\x63\164\x20\164\171\x70\x65\75\x22\164\145\x78\164\x22\x20\156\141\x6d\145\x3d\x22\x25\x73\137\157\162\x64\x65\162\x73\x5b\45\163\135\x5b\x70\141\162\143\145\x6c\x73\x5d\133\x25\163\135\133\x74\171\160\x65\x5d\x22\76", $this->id, $iKfxj, $yAh7Z); $IhAd_ = apply_filters($this->id . "\x5f\147\x65\164\x50\x61\x63\153\x61\147\145\x54\x79\160\145\x73", []); $iGh3H = false === empty($c7f0s["\x74\171\160\145"]) ? $c7f0s["\164\x79\x70\x65"] : ''; foreach ($IhAd_ as $qu7M8 => $zAIRJ) { echo sprintf("\x3c\157\160\x74\x69\x6f\156\40\166\141\x6c\x75\145\75\x22\45\x73\42\x20\x25\163\76\45\163\74\57\x6f\x70\x74\151\157\156\76", $qu7M8, $qu7M8 === $iGh3H ? "\163\x65\x6c\x65\x63\164\145\x64" : '', $zAIRJ); RUDNa: } lcPPe: echo "\x3c\x2f\163\145\x6c\x65\x63\x74\76"; echo "\x3c\57\144\151\x76\76"; echo "\x3c\x64\x69\166\76"; echo sprintf("\74\x69\156\160\165\x74\40\164\x79\x70\145\x3d\42\x74\x65\170\x74\42\40\143\154\x61\163\x73\x3d\42\x70\141\143\153\x61\147\145\114\145\x6e\x67\x74\150\x22\40\156\x61\x6d\x65\x3d\42\45\x73\137\x6f\162\144\145\x72\163\133\x25\163\x5d\x5b\x70\141\162\x63\145\x6c\163\135\x5b\45\163\x5d\x5b\154\145\156\x67\x74\150\x5d\x22\40\166\141\154\165\145\75\x22\x25\x73\42\57\x3e", $this->id, $iKfxj, $yAh7Z, $c7f0s["\x6c\x65\156\147\164\150"]); echo "\x3c\x73\x70\x61\x6e\76\170\74\x2f\x73\x70\x61\x6e\x3e"; echo sprintf("\x3c\x69\156\x70\x75\164\x20\x74\x79\x70\x65\x3d\42\x74\145\170\x74\42\x20\143\x6c\x61\163\x73\x3d\x22\x70\141\x63\153\141\147\x65\x57\151\x64\164\x68\42\40\156\x61\155\145\75\42\x25\x73\x5f\157\x72\144\x65\162\163\x5b\45\163\135\x5b\160\141\x72\x63\x65\154\163\135\133\x25\x73\135\133\167\151\x64\164\150\x5d\x22\40\x76\x61\x6c\x75\x65\75\x22\x25\163\x22\x2f\76", $this->id, $iKfxj, $yAh7Z, $c7f0s["\167\151\x64\x74\x68"]); echo "\x3c\x73\160\141\x6e\76\x78\x3c\57\163\x70\141\156\76"; echo sprintf("\74\x69\156\x70\165\164\40\x74\171\x70\x65\75\x22\164\145\170\164\x22\40\143\154\x61\163\163\75\42\x70\x61\x63\153\141\147\x65\110\145\151\x67\x68\164\42\x20\x6e\141\155\145\x3d\x22\x25\163\x5f\x6f\162\144\x65\162\x73\133\45\163\135\133\x70\141\162\x63\145\x6c\163\135\x5b\45\x73\135\x5b\x68\145\x69\147\x68\164\x5d\42\x20\x76\x61\154\x75\x65\75\x22\x25\x73\x22\x2f\76", $this->id, $iKfxj, $yAh7Z, $c7f0s["\x68\145\151\x67\150\x74"]); echo "\74\x73\x70\x61\156\76" . $this->dimensionUnit . "\x3c\x2f\163\160\141\x6e\76"; echo sprintf("\x3c\x69\x6e\160\165\x74\x20\x74\171\x70\145\75\x22\x74\145\170\164\x22\40\x63\154\141\163\x73\x3d\42\160\141\x63\153\141\x67\145\x57\x65\x69\x67\x68\164\42\40\x6e\x61\155\x65\75\42\45\x73\137\157\162\x64\145\x72\x73\133\x25\163\x5d\x5b\x70\141\162\x63\145\x6c\x73\135\133\x25\163\135\x5b\167\145\x69\x67\x68\164\x5d\42\40\166\x61\154\165\x65\75\42\45\x73\x22\57\76", $this->id, $iKfxj, $yAh7Z, $c7f0s["\x77\145\151\x67\150\x74"]); echo "\x3c\163\x70\x61\156\76" . $this->weightUnit . "\x3c\57\163\160\141\156\x3e"; echo "\74\x2f\x64\151\x76\76"; echo "\x3c\x64\151\x76\76"; echo sprintf("\x3c\151\156\x70\x75\164\x20\164\x79\160\x65\x3d\42\164\145\170\x74\42\40\143\x6c\141\x73\x73\75\x22\x70\141\x63\x6b\x61\147\145\x56\141\x6c\x75\x65\x22\x20\156\141\x6d\x65\x3d\42\45\163\x5f\157\162\144\145\162\163\133\x25\163\135\133\x70\141\x72\x63\x65\x6c\163\x5d\x5b\x25\163\x5d\x5b\x76\x61\154\165\x65\x5d\42\x20\x76\x61\154\x75\x65\x3d\x22\45\x73\x22\x2f\76", $this->id, $iKfxj, $yAh7Z, $c7f0s["\166\141\x6c\x75\x65"]); echo sprintf("\x3c\x73\145\x6c\145\x63\164\x20\x74\171\x70\145\75\x22\x74\145\x78\x74\42\x20\x63\x6c\x61\163\x73\75\42\160\x61\143\153\x61\x67\x65\103\165\162\x72\145\x6e\143\x79\42\40\x6e\x61\x6d\x65\x3d\x22\x25\163\137\157\162\x64\x65\x72\x73\x5b\45\163\x5d\133\x70\141\162\143\145\x6c\x73\135\133\45\x73\x5d\133\143\x75\162\162\x65\156\x63\171\135\42\x3e", $this->id, $iKfxj, $yAh7Z); $uhXTf = apply_filters($this->id . "\x5f\147\x65\x74\103\165\162\162\x65\x6e\143\x69\145\x73", []); $xmgKX = false === empty($c7f0s["\143\x75\x72\x72\145\156\143\171"]) ? $c7f0s["\143\x75\162\x72\145\156\x63\171"] : apply_filters($this->id . "\137\147\x65\x74\x44\x65\x66\x61\165\x6c\164\103\x75\162\x72\x65\x6e\x63\x79", ''); foreach ($uhXTf as $W7Lfy => $rG7YP) { echo sprintf("\74\x6f\x70\x74\151\x6f\156\x20\166\x61\154\x75\x65\x3d\42\45\x73\42\40\45\163\76\x25\163\x3c\x2f\x6f\160\x74\151\x6f\156\x3e", $W7Lfy, $W7Lfy === $xmgKX ? "\163\x65\x6c\145\143\164\x65\144" : '', $rG7YP); V1lql: } wdgNR: echo "\x3c\x2f\163\x65\154\x65\x63\164\76"; echo "\x3c\x2f\144\151\166\76"; } private function displayShipments(int $iKfxj, array $uUHNN): void { if (empty($iKfxj) || empty($uUHNN) || !is_array($uUHNN)) { return; } echo "\x3c\150\162\57\x3e"; echo sprintf("\x3c\x64\151\166\x20\x64\x61\x74\x61\x2d\157\162\144\x65\162\137\151\x64\75\42\x25\163\42\x20\x63\154\x61\x73\x73\x3d\x22\45\x73\x20\157\162\144\145\162\x53\x68\x69\160\x6d\x65\156\x74\163\42\76", $iKfxj, $this->id); echo sprintf("\74\144\x69\x76\x3e\74\163\164\162\x6f\156\147\76\x25\x73\x20\45\x73\x3c\x2f\x73\164\x72\157\156\147\76\74\57\144\x69\166\x3e", apply_filters($this->id . "\x5f\147\x65\x74\116\x61\155\145", ''), __("\x53\x68\151\160\x6d\x65\x6e\164", $this->id)); foreach ($uUHNN as $FCwSX => $uT9iq) { $this->displayShipment($iKfxj, (string) $FCwSX, $uT9iq); hmkwZ: } ePsMT: echo "\74\57\x64\x69\x76\x3e"; } private function displayShipment(int $iKfxj, string $FCwSX, array $uT9iq): bool { if (empty($uT9iq) || empty($FCwSX)) { return false; } echo sprintf("\74\x64\151\166\40\144\141\x74\x61\55\157\162\144\145\x72\137\x69\x64\x3d\42\45\163\x22\40\x64\x61\x74\141\x2d\163\x68\x69\160\155\x65\156\x74\x5f\x69\144\75\x22\x25\x73\42\40\143\x6c\x61\x73\x73\75\x22\x25\x73\40\157\x72\144\x65\x72\123\150\x69\160\155\145\x6e\x74\42\76", $iKfxj, $FCwSX, $this->id); echo "\74\150\162\x2f\76"; $HPgCo = ''; if (false === empty($uT9iq["\163\x65\x72\x76\151\143\145"]) && false === empty($uT9iq["\x72\x61\164\145\x73"][$uT9iq["\x73\x65\x72\166\151\143\145"]])) { $HgU64 = $uT9iq["\x72\x61\164\x65\x73"][$uT9iq["\163\x65\162\166\x69\x63\145"]]; $HPgCo = $HgU64["\x70\157\x73\164\x61\x67\x65\x5f\144\145\163\143\162\151\x70\164\151\157\x6e"]; } elseif (false === empty($uT9iq["\x73\145\x72\x76\x69\143\x65"])) { $IAeKJ = apply_filters($this->id . "\137\x67\x65\164\123\x65\x72\x76\x69\x63\x65\x73", []); if (false === empty($IAeKJ[$uT9iq["\x73\145\x72\x76\x69\x63\145"]])) { $HPgCo = $IAeKJ[$uT9iq["\163\x65\162\166\151\x63\145"]]; } } if (false === empty($HPgCo)) { echo sprintf("\x3c\x73\164\x72\x6f\x6e\x67\76\x25\x73\x3c\57\x73\164\x72\x6f\x6e\147\76\x3c\x62\162\57\x3e", $HPgCo); } do_action($this->id . "\137\x62\x65\x66\157\x72\145\137\141\144\155\151\156\137\x73\x68\x69\x70\x6d\x65\x6e\x74\x5f\x64\145\164\x61\151\x6c\163", $uT9iq); if (false === empty($uT9iq["\x63\141\x72\162\x69\145\x72\137\x74\162\141\x63\153\x69\x6e\147\137\143\157\x64\145"]) && false === empty($uT9iq["\x74\162\141\143\153\x69\156\x67\137\165\162\154"])) { echo sprintf("\74\141\40\150\x72\x65\x66\75\x22\45\163\x22\x20\x74\141\162\x67\145\x74\75\x22\137\x62\154\141\x6e\153\x22\x3e\45\x73\x3c\57\141\x3e\74\x62\x72\x2f\x3e", $uT9iq["\x74\162\x61\x63\153\151\156\147\137\x75\162\154"], $uT9iq["\x63\x61\162\x72\x69\x65\x72\137\164\162\x61\x63\x6b\x69\x6e\x67\x5f\x63\x6f\x64\145"]); } elseif (false === empty($uT9iq["\x63\141\x72\162\x69\x65\162\x5f\x74\162\141\143\153\x69\156\147\x5f\143\x6f\x64\x65"])) { echo sprintf("\45\x73\x3c\x62\162\x2f\x3e", $uT9iq["\143\x61\x72\162\151\145\x72\137\164\162\x61\x63\x6b\x69\x6e\147\x5f\143\157\144\145"]); } if (false === empty($uT9iq["\x73\x74\x61\164\165\163\137\x6e\141\x6d\x65"])) { echo sprintf("\x3c\x73\164\162\x6f\x6e\147\x3e\x25\163\74\57\163\x74\x72\157\156\x67\x3e\x20\74\x73\160\x61\x6e\x3e\x25\x73\x3c\x2f\x73\160\141\x6e\x3e\74\x62\162\x2f\76", __("\123\164\x61\164\x75\163\72", $this->id), $uT9iq["\x73\x74\141\x74\x75\x73\x5f\156\141\155\x65"]); } $iJher = ''; if (false === empty($uT9iq["\x70\157\163\164\141\147\x65\137\154\141\x62\x65\154\137\160\x6e\147\137\x75\162\154"])) { $iJher .= sprintf("\x3c\141\40\x68\162\145\x66\x3d\x22\45\x73\42\40\x74\x61\162\147\145\164\75\42\137\x62\x6c\x61\156\x6b\42\x3e\x25\163\74\57\141\x3e", $uT9iq["\x70\157\163\164\x61\x67\x65\x5f\154\x61\142\145\154\x5f\160\156\147\137\x75\162\154"], __("\x50\116\x47", $this->id)); } if (false === empty($uT9iq["\160\x6f\163\164\141\147\x65\137\154\x61\142\x65\154\x5f\x70\x64\x66\137\165\x72\154"])) { if (false === empty($iJher)) { $iJher .= "\40\174\x20"; } $iJher .= sprintf("\x3c\141\x20\150\x72\x65\146\x3d\42\x25\x73\x22\40\x74\x61\x72\147\145\x74\x3d\x22\x5f\x62\x6c\x61\156\x6b\x22\x3e\x25\163\x3c\x2f\x61\76", $uT9iq["\160\157\163\164\x61\147\145\x5f\154\x61\x62\145\x6c\x5f\x70\x64\146\x5f\x75\162\x6c"], __("\x50\x44\x46", $this->id)); } if (empty($iJher) && false === empty($uT9iq["\160\157\x73\x74\x61\x67\145\x5f\154\x61\142\x65\154"])) { foreach ($uT9iq["\x70\157\163\164\141\147\145\x5f\154\x61\142\145\x6c"] as $E4z_q) { if (false === empty($iJher)) { $iJher .= "\40\174\40"; } $iJher .= sprintf("\74\141\40\x68\162\x65\x66\x3d\x22\45\163\x22\40\164\141\162\x67\145\164\75\42\x5f\x62\x6c\141\156\153\x22\76\45\163\74\57\x61\76", $E4z_q["\165\x72\154"], strtoupper($E4z_q["\x66\x69\x6c\145\x5f\164\x79\160\145"] ?? $E4z_q["\146\x69\154\x65\124\171\160\x65"] ?? "\160\144\x66")); I6dcO: } R0rmv: } if (false === empty($iJher)) { echo sprintf("\74\x73\x74\x72\157\x6e\x67\76\45\x73\x3c\57\x73\164\162\157\x6e\x67\76\x20\45\x73\x3c\x62\x72\57\76", __("\114\141\x62\x65\x6c\x3a", $this->id), $iJher); } if (false === empty($uT9iq["\146\x6f\162\x6d\x73"])) { echo "\74\150\162\57\x3e"; echo sprintf("\x3c\x73\164\162\157\156\147\76\x25\163\74\57\x73\164\x72\x6f\156\x67\x3e\74\x62\162\x2f\76", __("\106\157\x72\155\x73\72", $this->id)); foreach ($uT9iq["\x66\x6f\x72\x6d\x73"] as $e6kC2) { $BacRU = strtoupper(preg_replace("\57\137\x2f", "\x20", $e6kC2["\x64\157\x63\x75\x6d\145\x6e\x74\x5f\x74\171\160\145"] ?? $e6kC2["\x74\171\x70\145"])); echo sprintf("\x2d\x20\74\x61\40\x68\x72\x65\x66\75\42\45\x73\x22\40\x74\141\162\x67\x65\164\75\42\x5f\142\x6c\x61\x6e\x6b\x22\76\45\x73\x3c\57\x61\76\x3c\x62\x72\x2f\x3e", $e6kC2["\x75\162\154"], $BacRU); DUx2P: } bblZn: } echo "\74\57\144\151\x76\76"; return true; } }
<?php declare (strict_types=1); namespace OneTeamSoftware\WC\Shipping; use OneTeamSoftware\Logger\LoggerInterface; use OneTeamSoftware\WP\Admin\Notices\Notices; class AdminOrders { private $id; private $pluginPath; private $settings; private $version; private $notices; private $logger; private $weightUnit; private $dimensionUnit; private $didScriptsEnqueue; public function __construct(string $hsNwz, string $OJCn7, LoggerInterface $w8Mi0, array $QUiBf = array(), string $CHbxS = null) { $this->id = $hsNwz; $this->pluginPath = $OJCn7; $this->settings = array_merge(["defaultShipmentDescription" => '', "enableBulkShipmentCreation" => "no", "useServiceSettingsForBulkShipmentCreation" => "no", "requireToBulkCreateShipments" => "yes", "requireToBulkPurchasePostage" => "yes", "requireToBulkPurchaseNewPostage" => "no", "enableServices" => "yes", "weight_unit" => "g", "dimension_unit" => "mm"], $QUiBf); $this->version = $CHbxS; $this->notices = new Notices($this->id . "_admin_orders"); $this->logger = $w8Mi0; $this->weightUnit = $this->settings["weight_unit"]; $this->dimensionUnit = $this->settings["dimension_unit"]; $this->didScriptsEnqueue = false; } public function register() : void { add_filter("bulk_actions-edit-shop_order", [$this, "onAddBulkActions"]); add_filter("manage_shop_order_posts_columns", [$this, "onAddColumns"], 100); add_action("manage_shop_order_posts_custom_column", [$this, "onDisplayColumn"]); add_action("wp_ajax_" . $this->id . "_createShipments", [$this, "onCreateShipments"]); add_action("wp_ajax_" . $this->id . "_buyShipments", [$this, "onBuyShipments"]); add_action("wp_ajax_" . $this->id . "_download", [$this, "onDownload"]); add_action("wp_ajax_" . $this->id . "_updateOrders", [$this, "onUpdateOrders"]); add_action($this->id . "_AdminOrders_displayOrderShipments", [$this, "displayOrderShipments"], 1, 1); } public function setSettings(array $QUiBf) : void { if (false === empty($QUiBf)) { $this->settings = array_replace_recursive($this->settings, $QUiBf); } } public function enqueueScripts(array $QUiBf = array()) : void { if ($this->didScriptsEnqueue) { return; } $this->didScriptsEnqueue = true; $d0aXd = "min.css"; $cvEsg = "min.js"; if (defined("WP_DEBUG") && WP_DEBUG) { $d0aXd = "css"; $cvEsg = "js"; } wp_register_script($this->id . "-labelloaderpage", plugins_url("assets/js/LabelLoaderPage." . $cvEsg, str_replace("phar://", '', $this->pluginPath)), ["jquery", "jquery-blockui"], $this->version); wp_enqueue_script($this->id . "-labelloaderpage"); wp_register_style($this->id . "-adminorders", plugins_url("assets/css/AdminOrders." . $d0aXd, str_replace("phar://", '', $this->pluginPath)), [], $this->version); wp_register_script($this->id . "-adminorders", plugins_url("assets/js/AdminOrders." . $cvEsg, str_replace("phar://", '', $this->pluginPath)), ["jquery", "jquery-blockui"], $this->version); wp_localize_script($this->id . "-adminorders", "adminorders_settings", $QUiBf); wp_enqueue_script($this->id . "-adminorders"); wp_enqueue_style($this->id . "-adminorders"); } public function onUpdateOrders() : void { $PTfgT = $this->getRequestedOrders(); if (empty($PTfgT)) { exit; } $this->logger->debug("/var/www/html/input.php", 192, "onUpdateOrders: %s", print_r($PTfgT, true)); foreach ($PTfgT as $iKfxj => $jPxXW) { do_action($this->id . "_setOrderShipmentMeta", $iKfxj, $jPxXW); } $xwZhu = apply_filters($this->id . "_getErrorMessages", []); if (empty($xwZhu)) { $this->notices->title = __("Order has been updated", $this->id); } else { $this->notices->title = __("Unable to update order", $this->id); } $this->displayNotices(); exit; } public function onAddBulkActions(array $yXvda) : array { if ($this->settings["enableBulkShipmentCreation"] !== "yes") { return $yXvda; } if ($this->mustCreateShipments()) { $yXvda[$this->id . "_createShipments"] = sprintf("%s: %s", apply_filters($this->id . "_getName", ''), __("Create Shipments", $this->id)); } if ($this->mustPurchasePostage()) { $yXvda[$this->id . "_buyShipments"] = sprintf("%s: %s", apply_filters($this->id . "_getName", ''), __("Buy Shipping Labels", $this->id)); } $yXvda[$this->id . "_download"] = sprintf("%s: %s", apply_filters($this->id . "_getName", ''), __("Print Shipping Labels and Forms", $this->id)); return $yXvda; } public function onDownload() : void { $JOVQw = $this->getRequestedOrderIds(); if (empty($JOVQw) || $this->getRequestedAction() !== $this->id . "_download") { return; } $this->logger->debug("/var/www/html/input.php", 259, "onDownload: %s", print_r($JOVQw, true)); wc_set_time_limit(0); do_action($this->id . "_clearErrorMessages"); $hWJKz = true; $c40q0 = []; if ($this->mustPurchasePostage()) { $c40q0 = apply_filters($this->id . "_getOrderShipmentsForOrders", [], $JOVQw); } else { $c40q0 = apply_filters($this->id . "_purchasePostageForOrders", [], $JOVQw, $this->mustCreateShipments(), $this->mustPurchaseNewPostage()); $hWJKz = false === empty($c40q0); } $A0JvM = []; if ($hWJKz) { $A0JvM = apply_filters($this->id . "_createPdfFileForOrderShipments", [], $c40q0); } if (isset($A0JvM["url"])) { $this->notices->title = sprintf("%s <a href=\"%s\" target=\"_blank\" class=\"%s postageLabelsAndForms\">%s</a>", __("Shipping labels and forms have been successfully created, ", $this->id), $A0JvM["url"], $this->id, __("click here to open it", $this->id)); } else { $this->notices->title = __("Unable to download any of the shipping labels or forms", $this->id); } $this->displayNotices(); $this->displayOrderShipments($c40q0); exit; } public function onBuyShipments() : void { $JOVQw = $this->getRequestedOrderIds(); if (empty($JOVQw) || $this->getRequestedAction() !== $this->id . "_buyShipments") { return; } $this->logger->debug("/var/www/html/input.php", 316, "onBuyShipments: %s", print_r($JOVQw, true)); wc_set_time_limit(0); do_action($this->id . "_clearErrorMessages"); $c40q0 = apply_filters($this->id . "_purchasePostageForOrders", [], $JOVQw, $this->mustCreateShipments()); if (false === empty($c40q0)) { $this->notices->title = __("Shipments have been successfully purchased", $this->id); } else { $this->notices->title = __("Errors have occurred during purchasing of the shipments", $this->id); } if (count($c40q0) >= count($JOVQw)) { do_action($this->id . "_clearErrorMessages"); } $this->displayNotices(); $this->displayOrderShipments($c40q0); exit; } public function onCreateShipments() : void { if (!apply_filters($this->id . "_hasCreateShipmentFeature", false)) { return; } $JOVQw = $this->getRequestedOrderIds(); if (empty($JOVQw) || $this->getRequestedAction() !== $this->id . "_createShipments") { return; } $this->logger->debug("/var/www/html/input.php", 356, "onCreateShipments: %s", print_r($JOVQw, true)); wc_set_time_limit(0); do_action($this->id . "_clearErrorMessages"); $c40q0 = apply_filters($this->id . "_createShipmentsForOrders", [], $JOVQw); if (false === empty($c40q0)) { $this->notices->title = __("Shipments have been successfully created", $this->id); } else { $this->notices->title = __("Errors have occurred during creation of the shipments", $this->id); } if (count($c40q0) >= count($JOVQw)) { do_action($this->id . "_clearErrorMessages"); } $this->displayNotices(); $this->displayOrderShipments($c40q0); exit; } public function onAddColumns(array $IFXu1) : array { $IFXu1["shipment_tracking"] = __("Shipment Tracking", $this->id); return $IFXu1; } public function onDisplayColumn(string $vh1Mh) : void { if ("shipment_tracking" !== $vh1Mh) { return; } global $post; if (!is_object($post) || !isset($post->ID)) { return; } $iKfxj = $post->ID; $QUiBf = ["id" => $this->id]; $this->enqueueScripts($QUiBf); $uUHNN = apply_filters($this->id . "_getOrderShipments", [], $iKfxj); if (empty($uUHNN)) { if ("yes" === $this->settings["enableBulkShipmentCreation"]) { $this->displayParcels($iKfxj); } } else { $this->displayShipments($iKfxj, $uUHNN); } } public function displayOrderShipments(array $c40q0) : void { foreach ($c40q0 as $iKfxj => $uUHNN) { echo sprintf("<div data-order_id=\"%s\" class=\"orderShipments\">", $iKfxj); $this->displayShipments($iKfxj, $uUHNN); echo "</div>"; } } private function getRequestedAction() : string { $kQf22 = ''; if (false === empty($_REQUEST["action"]) && $_REQUEST["action"] !== 1) { $kQf22 = $_REQUEST["action"]; } elseif (false === empty($_REQUEST["action2"]) && $_REQUEST["action2"] !== 1) { $kQf22 = $_REQUEST["action2"]; } return $kQf22; } private function getRequestedOrders() : array { if (!wp_verify_nonce($_POST[$this->id . "_nonce"], "bulk-posts")) { $this->notices->displayWithoutNotices = true; $this->notices->type = "error"; $this->notices->title = __("Session has expired, please reload page", $this->id); $this->notices->display(); return []; } if (empty($_POST[$this->id . "_orders"]) || !is_array($_POST[$this->id . "_orders"])) { $this->notices->displayWithoutNotices = true; $this->notices->type = "error"; $this->notices->title = __("Invalid input data", $this->id); $this->notices->display(); return []; } $ievNv = ["length" => __("Length", $this->id), "width" => __("Width", $this->id), "height" => __("Height", $this->id), "weight" => __("Weight", $this->id)]; $IAeKJ = apply_filters($this->id . "_getServices", []); $IhAd_ = apply_filters($this->id . "_getPackageTypes", []); $uhXTf = apply_filters($this->id . "_getCurrencies", []); $PTfgT = $_POST[$this->id . "_orders"]; foreach ($PTfgT as $YjKHd) { if (empty($YjKHd["service"]) || empty($IAeKJ[$YjKHd["service"]])) { $this->notices->displayWithoutNotices = true; $this->notices->type = "error"; $this->notices->title = __("Unknown service", $this->id); $this->notices->display(); return []; } if (empty($YjKHd["parcels"]) || !is_array($YjKHd["parcels"])) { $this->notices->displayWithoutNotices = true; $this->notices->type = "error"; $this->notices->title = __("Unknown parcel information", $this->id); $this->notices->display(); return []; } $yLnBK = $YjKHd["parcels"]; foreach ($yLnBK as $c7f0s) { foreach ($ievNv as $W7Lfy => $hujAK) { if (!isset($c7f0s[$W7Lfy]) || !is_numeric($c7f0s[$W7Lfy]) || $c7f0s[$W7Lfy] < 0) { $this->notices->displayWithoutNotices = true; $this->notices->type = "error"; $this->notices->title = sprintf(__("Invalid %s value", $this->id), $hujAK); $this->notices->display(); return []; } if (empty($c7f0s["type"]) || empty($IhAd_[$c7f0s["type"]])) { $this->notices->displayWithoutNotices = true; $this->notices->type = "error"; $this->notices->title = __("Unknown parcel type", $this->id); $this->notices->display(); return []; } if (empty($c7f0s["currency"]) || empty($uhXTf[$c7f0s["currency"]])) { $this->notices->displayWithoutNotices = true; $this->notices->type = "error"; $this->notices->title = __("Unknown currency", $this->id); $this->notices->display(); return []; } } } } return $PTfgT; } private function getRequestedOrderIds() : array { if ($this->settings["enableBulkShipmentCreation"] !== "yes") { return []; } if ($this->getRequestedAction() === '' || empty($_REQUEST["post"])) { return []; } if (!wp_verify_nonce($_REQUEST["_wpnonce"], "bulk-posts")) { return []; } return array_map("absint", (array) $_REQUEST["post"]); } private function mustCreateShipments() : bool { $Ef2TL = false; if (apply_filters($this->id . "_hasCreateShipmentFeature", false)) { $Ef2TL = "yes" === $this->settings["requireToBulkCreateShipments"]; } return $Ef2TL; } private function mustPurchasePostage() : bool { return "yes" === $this->settings["requireToBulkPurchasePostage"]; } private function mustPurchaseNewPostage() : bool { return "yes" === $this->settings["requireToBulkPurchaseNewPostage"]; } private function displayNotices() : void { $xwZhu = apply_filters($this->id . "_getErrorMessages", []); if (false === empty($xwZhu)) { $this->notices->type = "error"; foreach ($xwZhu as $mPL75) { $this->notices->add($mPL75); } } else { $this->notices->type = "updated"; } $this->notices->displayWithoutNotices = true; $this->notices->display(); } private function displayParcels(int $iKfxj) : void { $yLnBK = []; $jPxXW = apply_filters($this->id . "_getOrderShipmentMeta", [], $iKfxj); if (empty($jPxXW["parcels"])) { return; } $i4ob6 = $jPxXW["service"]; $yLnBK = $jPxXW["parcels"]; $IhAd_ = apply_filters($this->id . "_getPackageTypes", []); echo sprintf("<div class=\"%s adminOrders\">", $this->id); echo sprintf("<div><strong>%s</strong></div><hr/>", apply_filters($this->id . "_getName", '')); echo "<div>"; echo sprintf("<select type=\"text\" name=\"%s_orders[%s][service]\">", $this->id, $iKfxj); $IAeKJ = apply_filters($this->id . "_getServices", []); $M6r_P = "yes" === $this->settings["enableServices"]; if (empty($this->settings["services"])) { $M6r_P = true; } foreach ($IAeKJ as $V9IRd => $HPgCo) { if ("yes" === $this->settings["useServiceSettingsForBulkShipmentCreation"]) { $Li75H = ["enabled" => $M6r_P ? "yes" : "no"]; if (false === empty($this->settings["services"][$V9IRd])) { $Li75H = $this->settings["services"][$V9IRd]; } if ($Li75H["enabled"] === "no") { goto eQBVk; } } echo sprintf("<option value=\"%s\" %s>%s</option>", $V9IRd, $V9IRd === $i4ob6 ? "selected" : '', apply_filters($this->id . "_service_name", $HPgCo, $V9IRd)); eQBVk: } echo "</select>"; echo "</div>"; foreach ($yLnBK as $yAh7Z => $c7f0s) { $this->displayParcel($iKfxj, $yAh7Z, $c7f0s, $IAeKJ, $IhAd_); } echo sprintf("<button class=\"update submit button\">%s</button>", __("Update", $this->id)); echo "</div>"; } private function displayParcel(int $iKfxj, int $yAh7Z, array $c7f0s, array $IAeKJ, array $IhAd_) : void { if (empty($c7f0s)) { return; } if ($yAh7Z > 0) { echo "<hr/>"; } echo sprintf("<div><strong>%s%s</strong></div>", __("Parcel #", $this->id), $yAh7Z + 1); echo "<div>"; $cjrD1 = $this->settings["defaultShipmentDescription"]; if (false === empty($c7f0s["description"])) { $cjrD1 = $c7f0s["description"]; } echo sprintf("<input type=\"text\" class=\"packageDescription\" name=\"%s_orders[%s][parcels][%s][description]\" placeholder=\"%s\" value=\"%s\"/>", $this->id, $iKfxj, $yAh7Z, __("Description", $this->id), $cjrD1); echo "</div>"; echo "<div>"; echo sprintf("<select type=\"text\" name=\"%s_orders[%s][parcels][%s][type]\">", $this->id, $iKfxj, $yAh7Z); $IhAd_ = apply_filters($this->id . "_getPackageTypes", []); $iGh3H = false === empty($c7f0s["type"]) ? $c7f0s["type"] : ''; foreach ($IhAd_ as $qu7M8 => $zAIRJ) { echo sprintf("<option value=\"%s\" %s>%s</option>", $qu7M8, $qu7M8 === $iGh3H ? "selected" : '', $zAIRJ); } echo "</select>"; echo "</div>"; echo "<div>"; echo sprintf("<input type=\"text\" class=\"packageLength\" name=\"%s_orders[%s][parcels][%s][length]\" value=\"%s\"/>", $this->id, $iKfxj, $yAh7Z, $c7f0s["length"]); echo "<span>x</span>"; echo sprintf("<input type=\"text\" class=\"packageWidth\" name=\"%s_orders[%s][parcels][%s][width]\" value=\"%s\"/>", $this->id, $iKfxj, $yAh7Z, $c7f0s["width"]); echo "<span>x</span>"; echo sprintf("<input type=\"text\" class=\"packageHeight\" name=\"%s_orders[%s][parcels][%s][height]\" value=\"%s\"/>", $this->id, $iKfxj, $yAh7Z, $c7f0s["height"]); echo "<span>" . $this->dimensionUnit . "</span>"; echo sprintf("<input type=\"text\" class=\"packageWeight\" name=\"%s_orders[%s][parcels][%s][weight]\" value=\"%s\"/>", $this->id, $iKfxj, $yAh7Z, $c7f0s["weight"]); echo "<span>" . $this->weightUnit . "</span>"; echo "</div>"; echo "<div>"; echo sprintf("<input type=\"text\" class=\"packageValue\" name=\"%s_orders[%s][parcels][%s][value]\" value=\"%s\"/>", $this->id, $iKfxj, $yAh7Z, $c7f0s["value"]); echo sprintf("<select type=\"text\" class=\"packageCurrency\" name=\"%s_orders[%s][parcels][%s][currency]\">", $this->id, $iKfxj, $yAh7Z); $uhXTf = apply_filters($this->id . "_getCurrencies", []); $xmgKX = false === empty($c7f0s["currency"]) ? $c7f0s["currency"] : apply_filters($this->id . "_getDefaultCurrency", ''); foreach ($uhXTf as $W7Lfy => $rG7YP) { echo sprintf("<option value=\"%s\" %s>%s</option>", $W7Lfy, $W7Lfy === $xmgKX ? "selected" : '', $rG7YP); } echo "</select>"; echo "</div>"; } private function displayShipments(int $iKfxj, array $uUHNN) : void { if (empty($iKfxj) || empty($uUHNN) || !is_array($uUHNN)) { return; } echo "<hr/>"; echo sprintf("<div data-order_id=\"%s\" class=\"%s orderShipments\">", $iKfxj, $this->id); echo sprintf("<div><strong>%s %s</strong></div>", apply_filters($this->id . "_getName", ''), __("Shipment", $this->id)); foreach ($uUHNN as $FCwSX => $uT9iq) { $this->displayShipment($iKfxj, (string) $FCwSX, $uT9iq); } echo "</div>"; } private function displayShipment(int $iKfxj, string $FCwSX, array $uT9iq) : bool { if (empty($uT9iq) || empty($FCwSX)) { return false; } echo sprintf("<div data-order_id=\"%s\" data-shipment_id=\"%s\" class=\"%s orderShipment\">", $iKfxj, $FCwSX, $this->id); echo "<hr/>"; $HPgCo = ''; if (false === empty($uT9iq["service"]) && false === empty($uT9iq["rates"][$uT9iq["service"]])) { $HgU64 = $uT9iq["rates"][$uT9iq["service"]]; $HPgCo = $HgU64["postage_description"]; } elseif (false === empty($uT9iq["service"])) { $IAeKJ = apply_filters($this->id . "_getServices", []); if (false === empty($IAeKJ[$uT9iq["service"]])) { $HPgCo = $IAeKJ[$uT9iq["service"]]; } } if (false === empty($HPgCo)) { echo sprintf("<strong>%s</strong><br/>", $HPgCo); } do_action($this->id . "_before_admin_shipment_details", $uT9iq); if (false === empty($uT9iq["carrier_tracking_code"]) && false === empty($uT9iq["tracking_url"])) { echo sprintf("<a href=\"%s\" target=\"_blank\">%s</a><br/>", $uT9iq["tracking_url"], $uT9iq["carrier_tracking_code"]); } elseif (false === empty($uT9iq["carrier_tracking_code"])) { echo sprintf("%s<br/>", $uT9iq["carrier_tracking_code"]); } if (false === empty($uT9iq["status_name"])) { echo sprintf("<strong>%s</strong> <span>%s</span><br/>", __("Status:", $this->id), $uT9iq["status_name"]); } $iJher = ''; if (false === empty($uT9iq["postage_label_png_url"])) { $iJher .= sprintf("<a href=\"%s\" target=\"_blank\">%s</a>", $uT9iq["postage_label_png_url"], __("PNG", $this->id)); } if (false === empty($uT9iq["postage_label_pdf_url"])) { if (false === empty($iJher)) { $iJher .= " | "; } $iJher .= sprintf("<a href=\"%s\" target=\"_blank\">%s</a>", $uT9iq["postage_label_pdf_url"], __("PDF", $this->id)); } if (empty($iJher) && false === empty($uT9iq["postage_label"])) { foreach ($uT9iq["postage_label"] as $E4z_q) { if (false === empty($iJher)) { $iJher .= " | "; } $iJher .= sprintf("<a href=\"%s\" target=\"_blank\">%s</a>", $E4z_q["url"], strtoupper($E4z_q["file_type"] ?? $E4z_q["fileType"] ?? "pdf")); } } if (false === empty($iJher)) { echo sprintf("<strong>%s</strong> %s<br/>", __("Label:", $this->id), $iJher); } if (false === empty($uT9iq["forms"])) { echo "<hr/>"; echo sprintf("<strong>%s</strong><br/>", __("Forms:", $this->id)); foreach ($uT9iq["forms"] as $e6kC2) { $BacRU = strtoupper(preg_replace("/_/", " ", $e6kC2["document_type"] ?? $e6kC2["type"])); echo sprintf("- <a href=\"%s\" target=\"_blank\">%s</a><br/>", $e6kC2["url"], $BacRU); } } echo "</div>"; return true; } }
■【無料】ワードプレス:マルウェアスキャン&セキュリティープラグイン [マルウェア・ウィルス検出と駆除]
■WordPress のマルウェア駆除、セキュリティー対策 カスタマイズや修正、引っ越し・復旧のご依頼承ります
(C)2019 ワードプレス ドクター All rights reserved.