Find this useful? Enter your email to receive occasional updates for securing PHP code.

Signing you up...

Thank you for signing up!

PHP Decode

<?php declare (strict_types=1); namespace OneTeamSoftware\WC\Shipping; use OneTeamSoftwa..

Decoded Output download

<?php 
 declare (strict_types=1); namespace OneTeamSoftware\WC\Shipping; use OneTeamSoftware\Cache\CacheInterface; use OneTeamSoftware\LazyClassProxy\LazyClassProxy; use OneTeamSoftware\Logger\LoggerInterface; use OneTeamSoftware\WC\Admin\Form\Form; use OneTeamSoftware\WP\Admin\MetaBox\AbstractMetaBox; use OneTeamSoftware\WP\Admin\Notices\Notices; use WC_Order; use WP_Post; class ShipmentMetaBox extends AbstractMetaBox { private const CACHE_EXPIRATION_IN_SECONDS = 48 * 60 * 60; private $pluginPath; private $settings; private $version; private $weightUnit; private $dimensionUnit; private $notices; private $contentTypes; private $logger; private $cache; private $vendorSettingsLoader; private $vendorId; public function __construct(string $zDsBP, string $HWG_F, LoggerInterface $j8tRa, CacheInterface $ZUcN0, VendorSettingsLoader $Br9M_, array $QiMfo, string $fpjGg = null) { parent::__construct($zDsBP, sprintf(__("%s Shipment", $zDsBP), apply_filters($zDsBP . "_getName", '')), ["shop_order"], "side", "high"); $this->pluginPath = $HWG_F; $this->contentTypes = apply_filters($this->id . "_getContentTypes", []); $this->settings = array_merge(["cache" => "yes", "cacheExpirationInSecs" => 10 * 60, "allowMultipleShipments" => "yes", "allowCreateShipmentFeature" => "yes", "allowLinkFeature" => "yes", "allowUnlinkFeature" => "yes", "allowDeleteFeature" => "yes", "allowRefundFeature" => "yes", "allowReturnLabelFeature" => "yes", "allowMediaMailFeature" => "yes", "allowCodFeature" => "yes", "allowInsuranceFeature" => "yes", "allowSignatureFeature" => "yes", "allowSaturdayDeliveryFeature" => "yes", "allowHoldForPickupFeature" => "yes", "allowAlcoholFeature" => "yes", "allowDryIceFeature" => "yes", "allowToExceedShippingTotal" => "yes", "requireToFetchShippingRates" => "yes", "requireToCreateShipment" => "no", "requireToPurchasePostage" => "no", "requireToConfirmShipmentDetails" => "yes", "cod" => "no", "cod_method" => '', "insurance" => "no", "signature" => "no", "mediaMail" => "exclude", "defaultShipmentDescription" => '', "defaultTariff" => '', "defaultCountryOfOrigin" => '', "boxes" => [], "defaultContents" => current(array_keys($this->contentTypes)), "vendor_id" => 0, "weight_unit" => "g", "dimension_unit" => "mm"], $QiMfo); $this->version = $fpjGg; $this->weightUnit = $this->settings["weight_unit"]; $this->dimensionUnit = $this->settings["dimension_unit"]; $this->notices = new Notices($this->id); $this->logger = $j8tRa; $this->cache = $ZUcN0; $this->vendorSettingsLoader = $Br9M_; $this->vendorId = 0; } public function register() : void { add_action($this->id . "_displayShipmentMetaBox", [$this, "displayForPost"], 1, 2); add_action("wp_ajax_" . $this->id . "_fetchShippingRates", [$this, "onFetchRates"]); add_action("wp_ajax_" . $this->id . "_createShipment", [$this, "onCreateShipment"]); add_action("wp_ajax_" . $this->id . "_cancelCreateShipment", [$this, "onCancelCreateShipment"]); add_action("wp_ajax_" . $this->id . "_refundShipment", [$this, "onRefundShipment"]); add_action("wp_ajax_" . $this->id . "_cancelShipment", [$this, "onCancelShipment"]); add_action("wp_ajax_" . $this->id . "_unlinkShipment", [$this, "onUnlinkShipment"]); add_action("wp_ajax_" . $this->id . "_buyShipment", [$this, "onBuyShipment"]); add_action("wp_ajax_" . $this->id . "_refreshShipment", [$this, "onRefreshShipment"]); add_action("woocommerce_admin_order_item_headers", [$this, "onOrderItemHeaders"], 1, 1); add_action("woocommerce_admin_order_item_values", [$this, "onOrderItemValues"], 1, 3); add_action("woocommerce_before_order_itemmeta", [$this, "onBeforeOrderItemMeta"], 1, 3); } public function displayForPost(int $I_bHg, int $z8b7C = 0) : void { $this->logger->debug(__FILE__, 204, "displayForPost, postId: " . $I_bHg . ", vendorId: " . $z8b7C); $post = get_post($I_bHg); if (empty($post)) { return; } if (false === empty($this->postTypes) && !in_array($post->post_type, (array) $this->postTypes, true)) { return; } $this->setVendorId($z8b7C); $this->onCreateMetaBox($post); } public function setSettings(array $QiMfo) : void { $this->settings = array_merge($this->settings, $QiMfo); if (false === empty($this->settings["vendor_id"])) { $this->setVendorId($this->settings["vendor_id"]); } } public function enqueueScripts(array $QiMfo = []) : void { $J1ZmM = "min.css"; $jenWR = "min.js"; if (defined("WP_DEBUG") && WP_DEBUG) { $J1ZmM = "css"; $jenWR = "js"; } wp_register_style($this->id . "-switchify", plugins_url("assets/css/switchify." . $J1ZmM, str_replace("phar://", '', $this->pluginPath)), [], $this->version); wp_enqueue_style($this->id . "-switchify"); wp_register_script($this->id . "-switchify", plugins_url("assets/js/switchify." . $jenWR, str_replace("phar://", '', $this->pluginPath)), ["jquery"], $this->version); wp_enqueue_script($this->id . "-switchify"); wp_register_script($this->id . "-labelloaderpage", plugins_url("assets/js/LabelLoaderPage." . $jenWR, str_replace("phar://", '', $this->pluginPath)), ["jquery", "jquery-blockui"], $this->version); wp_enqueue_script($this->id . "-labelloaderpage"); wp_register_style($this->id . "-shipmentmetabox", plugins_url("assets/css/ShipmentMetaBox." . $J1ZmM, str_replace("phar://", '', $this->pluginPath)), ["wp-jquery-ui-dialog"], $this->version); wp_enqueue_style($this->id . "-shipmentmetabox"); wp_register_script($this->id . "-shipmentmetabox", plugins_url("assets/js/ShipmentMetaBox." . $jenWR, str_replace("phar://", '', $this->pluginPath)), ["jquery", "jquery-blockui", "jquery-ui-dialog"], $this->version); wp_enqueue_script($this->id . "-shipmentmetabox"); wp_localize_script($this->id . "-shipmentmetabox", "shipmentmetabox_settings", $QiMfo); } public function onOrderItemHeaders(?WC_Order $knBKR) : void { if (!$this->canCreateShipment($knBKR)) { return; } $this->logger->debug(__FILE__, 305, "onOrderItemHeaders, orderId: %d", $knBKR->get_id()); echo sprintf("<th class="%s itemsInParcel value sortable" data-sort="float" style="display: none;">%s</th>", $this->id, __("Value", $this->id)); echo sprintf("<th class="%s itemsInParcel quantity sortable" data-sort="float" style="display: none;">%s</th>", $this->id, __("Quantity in Parcel", $this->id)); if (!apply_filters($this->id . "_hasCustomItemsFeature", false) || $this->isLocalOrder($knBKR)) { $this->logger->debug(__FILE__, 319, "No customs items feature or it is a local order, so skip other columns"); return; } echo sprintf("<th class="%s itemsInParcel country sortable" data-sort="string-ins" style="display: none;">%s</th>", $this->id, __("Country of Origin", $this->id)); if (apply_filters($this->id . "_hasTariffFeature", false)) { echo sprintf("<th class="%s itemsInParcel country sortable" data-sort="string-ins" style="display: none;"><a href="https://hts.usitc.gov/" target="_blank">%s</a></th>", $this->id, __("Tariff #", $this->id)); } } public function onOrderItemValues($Xa_kO, $JOnWX, $OTGUp) : void { $knBKR = $this->getCurrentOrder(); if (!is_object($knBKR) || empty($Xa_kO) || !is_a($JOnWX, "WC_Order_Item_Product") || !$this->canCreateShipment($knBKR)) { return; } $s71IQ = $JOnWX->get_quantity(); $s52qy = $JOnWX->get_total(); $this->logger->debug(__FILE__, 357, "onOrderItemValues, productId: %d, name: %s, quantity: %d, price: %s", $Xa_kO->get_id(), $Xa_kO->get_name(), $s71IQ, $s52qy); if ($s71IQ > 0) { $s52qy /= $s71IQ; } echo sprintf("<td class="%s itemsInParcel value" style="display: none;"><input type="hidden" name="%s_package[items][%d][id]" value="%d"/><input type="number" data-item-id="%d" name="%s_package[items][%d][value]" step="0.01" min="0" value="%.2f"/></td>", $this->id, $this->id, $Xa_kO->get_id(), $Xa_kO->get_id(), $Xa_kO->get_id(), $this->id, $Xa_kO->get_id(), $s52qy); echo sprintf("<td class="%s itemsInParcel quantity" style="display: none;"><input type="number" data-item-id="%d" name="%s_package[items][%d][quantity]" step="1" min="0" value="%d"/></td>", $this->id, $Xa_kO->get_id(), $this->id, $Xa_kO->get_id(), $s71IQ); if (!apply_filters($this->id . "_hasCustomItemsFeature", false) || $this->isLocalOrder($knBKR)) { return; } $d0n9e = (new LazyClassProxy("WC_Countries", WC()->countries))->get_countries(); $qnWWJ = $this->settings["defaultCountryOfOrigin"]; echo sprintf("<td class="%s itemsInParcel country" style="display: none;"><select name="%s_package[items][%d][origin_country]">", $this->id, $this->id, $Xa_kO->get_id()); foreach ($d0n9e as $gf7s7 => $GT8nC) { echo sprintf("<option value="%s"%s>%s</option>", $gf7s7, $gf7s7 === $qnWWJ ? " selected" : '', __($GT8nC, $this->id)); FClcP: } qUpGB: echo "</select></td>"; if (apply_filters($this->id . "_hasTariffFeature", false)) { echo sprintf("<td class="%s itemsInParcel hts" style="display: none;"><input type="text" data-item-id="%d" name="%s_package[items][%d][tariff]" value="%s"/></td>", $this->id, $Xa_kO->get_id(), $this->id, $Xa_kO->get_id(), $this->settings["defaultTariff"]); } } public function onBeforeOrderItemMeta($OTGUp, $JOnWX, $Xa_kO) : void { $knBKR = $this->getCurrentOrder(); if (empty($Xa_kO) || false === is_object($knBKR) || false === is_a($JOnWX, "WC_Order_Item_Product") || false === $this->canCreateShipment($knBKR)) { return; } echo sprintf("<input type="text" class="%s itemsInParcel name" data-item-id="%d" name="%s_package[items][%d][name]" value="%s" style="display: none;" />", $this->id, $Xa_kO->get_id(), $this->id, $Xa_kO->get_id(), $Xa_kO->get_name()); } public function display(WP_Post $post) : void { $HM0Dk = $post->ID; $this->logger->debug(__FILE__, 462, "display: {$HM0Dk}"); $knBKR = wc_get_order($HM0Dk); if (empty($knBKR)) { $this->logger->debug(__FILE__, 466, "Order is invalid"); $this->notices->type = "error inline"; $this->notices->add(__("Order is invalid", $this->id)); $this->notices->display(); return; } $r61_O = apply_filters($this->id . "_getOrderShipmentMeta", [], $HM0Dk, $this->vendorId); if (empty($r61_O)) { $this->logger->debug(__FILE__, 477, "Order has no shipments"); $this->notices->type = "error inline"; $this->notices->add(__("Order has no shipments", $this->id)); $this->notices->display(); return; } $this->logger->debug(__FILE__, 486, "Current Vendor Id: %d", $this->vendorId); $this->settings["vendor_id"] = $this->vendorId; $CoIJQ = []; $D5GyH = false; $bs3Qa = $this->getPackageCache($HM0Dk); if (empty($bs3Qa)) { if (false === empty($r61_O["parcels"])) { $CoIJQ = $r61_O["parcels"]; } $CoIJQ = $this->prepareParcels($CoIJQ); $bs3Qa = current($CoIJQ); if (empty($bs3Qa["weight_unit"])) { $bs3Qa["weight_unit"] = $this->weightUnit; } if (empty($bs3Qa["dimension_unit"])) { $bs3Qa["dimension_unit"] = $this->dimensionUnit; } $bs3Qa["parcels"] = $CoIJQ; $bs3Qa["parcelIdx"] = 0; if (false === empty($r61_O["service"])) { $bs3Qa["service"] = $r61_O["service"]; } else { $bs3Qa["service"] = ''; } if (isset($bs3Qa["mediaMail"])) { $bs3Qa["mediaMail"] = "only" === $bs3Qa["mediaMail"]; } else { $bs3Qa["mediaMail"] = "only" === $this->settings["mediaMail"]; } if (isset($bs3Qa["cod"])) { $bs3Qa["cod"] = "yes" === $bs3Qa["cod"]; } else { $bs3Qa["cod"] = "yes" === $this->settings["cod"]; } if (isset($bs3Qa["insurance"])) { $bs3Qa["insurance"] = "yes" === $bs3Qa["insurance"]; } else { $bs3Qa["insurance"] = "yes" === $this->settings["insurance"]; } if (isset($bs3Qa["signature"])) { $bs3Qa["signature"] = "yes" === $bs3Qa["signature"]; } else { $bs3Qa["signature"] = "yes" === $this->settings["signature"]; } } else { $D5GyH = true; } if (false === empty($this->settings["defaultShipmentDescription"])) { $bs3Qa["description"] = $this->settings["defaultShipmentDescription"]; } $WUB0W = $this->getServices(); $EvwTZ = false; if ("no" === $this->settings["requireToFetchShippingRates"]) { if (empty($bs3Qa["services"]) && false === empty($bs3Qa["service"]) && false === empty($WUB0W[$bs3Qa["service"]])) { $bs3Qa["services"] = [$bs3Qa["service"] => apply_filters($this->id . "_service_name", $WUB0W[$bs3Qa["service"]], $bs3Qa["service"])]; $EvwTZ = true; } } $this->logger->debug(__FILE__, 564, "Package: %s", print_r($bs3Qa, true)); $SIdhZ = apply_filters($this->id . "_getOrderShipments", [], $HM0Dk, '', $this->vendorId); $D5GyH = $D5GyH && $this->canDisplayAddShipmentForm($SIdhZ); foreach ($SIdhZ as $J7zSn) { $this->displayShipmentDetails($J7zSn, $D5GyH === false); Rla3T: } mXknu: $WSttQ = $this->isLocalOrder($knBKR); if ($this->canDisplayAddShipmentForm($SIdhZ)) { $this->logger->debug(__FILE__, 578, "Multiple shipments are allowed or we have no shipments yet"); $this->displayActionButtons($D5GyH); $this->displayLinkShipmentForm(); $this->displayAddShipmentForm($bs3Qa, $WSttQ, $EvwTZ, $D5GyH); } $z46WW = wp_create_nonce($this->id . "_settingsKey"); $this->logger->debug(__FILE__, 587, "Store settings to the cache: %s", print_r($this->settings, true)); $this->cache->set($z46WW, $this->settings, self::CACHE_EXPIRATION_IN_SECONDS); $QiMfo = ["id" => $this->id, "metaBoxContentsId" => $this->id . "_metaBox_contents", "orderId" => $HM0Dk, "settingsKey" => $z46WW, "ajaxurl" => admin_url("admin-ajax.php"), "allowMultipleShipments" => $this->settings["allowMultipleShipments"], "confirmButtonText" => __("Confirm", $this->id), "cancelButtonText" => __("Cancel", $this->id), "confirmDeleteText" => __("Are you sure want to cancel this shipment?", $this->id), "confirmUnlinkText" => __("Are you sure want to unlink this shipment?", $this->id), "confirmRefundText" => __("Are you sure want to request refund for this shipment?", $this->id), "confirmShipmentDetailsTitle" => __("Confirm Shipment Details", $this->id), "confirmShipmentDetailsTemplate" => $this->getConfirmShipmentDetailsTemplate($WSttQ), "requireToFetchShippingRates" => $this->settings["requireToFetchShippingRates"], "requireToCreateShipment" => $this->settings["requireToCreateShipment"], "requireToConfirmShipmentDetails" => $this->settings["requireToConfirmShipmentDetails"], "parcels" => $CoIJQ]; $QiMfo = apply_filters($this->id . "_preparePackageForOrder", $QiMfo, $HM0Dk, $this->vendorId); $this->enqueueScripts($QiMfo); } public function onCancelShipment() : void { $this->logger->debug(__FILE__, 623, "onCancelShipment"); if (!$this->loadCachedSettings()) { exit; } $HM0Dk = $this->getRequestedOrderId(); if (empty($HM0Dk)) { return; } $dq8oo = $this->getRequestedShipmentId(); if (empty($dq8oo)) { exit; } do_action($this->id . "_clearErrorMessages"); $J7zSn = apply_filters($this->id . "_cancelShipmentForOrder", [], $HM0Dk, $dq8oo, $this->vendorId); $this->displayNotices(); $this->displayShipmentDetails($J7zSn); exit; } public function onUnlinkShipment() : void { $this->logger->debug(__FILE__, 654, "onUnlinkShipment"); if (!$this->loadCachedSettings()) { exit; } $HM0Dk = $this->getRequestedOrderId(); if (empty($HM0Dk)) { return; } $dq8oo = $this->getRequestedShipmentId(); if (empty($dq8oo)) { exit; } do_action($this->id . "_unlinkShipmentFromOrder", $HM0Dk, $dq8oo, $this->vendorId); exit; } public function onRefundShipment() : void { $this->logger->debug(__FILE__, 682, "onRefundShipment"); if (!$this->loadCachedSettings()) { exit; } $HM0Dk = $this->getRequestedOrderId(); if (empty($HM0Dk)) { exit; } $dq8oo = $this->getRequestedShipmentId(); if (empty($dq8oo)) { exit; } do_action($this->id . "_clearErrorMessages"); $J7zSn = apply_filters($this->id . "_refundShipmentForOrder", [], $HM0Dk, $dq8oo, $this->vendorId); $this->displayNotices(); $this->displayShipmentDetails($J7zSn); exit; } public function onCancelCreateShipment() : void { $this->logger->debug(__FILE__, 713, "onCancelCreateShipment"); if (!$this->loadCachedSettings()) { exit; } $HM0Dk = $this->getRequestedOrderId(); if (empty($HM0Dk)) { exit; } $this->deletePackageCache($HM0Dk); exit; } public function onBuyShipment() : void { $this->logger->debug(__FILE__, 736, "onBuyShipment"); if (!$this->loadCachedSettings()) { exit; } $HM0Dk = $this->getRequestedOrderId(); if (empty($HM0Dk)) { exit; } $J7zSn = null; $dq8oo = $this->getRequestedShipmentId(false); if (false === empty($dq8oo)) { $SIdhZ = apply_filters($this->id . "_getOrderShipments", [], $HM0Dk, $dq8oo, $this->vendorId); $J7zSn = current($SIdhZ); } else { $this->logger->debug(__FILE__, 754, "No shipment ID, so use posted package"); $J7zSn = $this->getRequestedPackage($HM0Dk); } $this->logger->debug(__FILE__, 758, "Shipment: %s", print_r($J7zSn, true)); if (empty($J7zSn)) { exit; } do_action($this->id . "_clearErrorMessages"); $J7zSn = apply_filters($this->id . "_purchasePostageForShipment", $J7zSn, $HM0Dk, $this->vendorId); $this->displayNotices(); if (empty($J7zSn["id"])) { if (!$this->mustCreateShipment() && false === empty($dq8oo)) { do_action($this->id . "_unlinkShipmentFromOrder", $HM0Dk, $dq8oo, $this->vendorId); } exit; } $this->displayShipmentDetails($J7zSn); $this->deletePackageCache($HM0Dk); exit; } public function onCreateShipment() : void { $this->logger->debug(__FILE__, 788, "onCreateShipment"); if (!$this->loadCachedSettings()) { exit; } $HM0Dk = $this->getRequestedOrderId(); if (empty($HM0Dk)) { exit; } $J7zSn = $this->createShipment($HM0Dk); if (false === empty($J7zSn["id"])) { $this->displayShipmentDetails($J7zSn); } exit; } public function onFetchRates() : void { $this->logger->debug(__FILE__, 814, "onFetchRates"); if (!$this->loadCachedSettings()) { exit; } $HM0Dk = $this->getRequestedOrderId(); if (empty($HM0Dk)) { exit; } $bs3Qa = $this->getRequestedPackage($HM0Dk); if (empty($bs3Qa)) { exit; } $igqXp = $bs3Qa; if (isset($igqXp["service"])) { unset($igqXp["service"]); } do_action($this->id . "_clearErrorMessages"); $WUB0W = apply_filters($this->id . "_getServicesForOrder", [], $HM0Dk, $igqXp, $this->vendorId); $this->displayNotices(); if (false === empty($WUB0W)) { $bs3Qa["services"] = $WUB0W; $this->setPackageCache($HM0Dk, $bs3Qa); $N1jGU = new Form($this->getServicesFields($WUB0W)); $N1jGU->display([$this->id . "_package" => $bs3Qa]); } exit; } public function onRefreshShipment() : void { $this->logger->debug(__FILE__, 863, "onRefreshShipment"); if (!$this->loadCachedSettings()) { exit; } $HM0Dk = $this->getRequestedOrderId(); if (empty($HM0Dk)) { exit; } $dq8oo = $this->getRequestedShipmentId(); if (empty($dq8oo)) { exit; } do_action($this->id . "_clearErrorMessages"); $J7zSn = apply_filters($this->id . "_fetchShipmentForOrder", [], $HM0Dk, $dq8oo, $this->vendorId); $this->displayNotices(); $this->displayShipmentDetails($J7zSn); exit; } protected function canAddMetaBox(WP_Post $post) : bool { $HM0Dk = $post->ID; $knBKR = wc_get_order($HM0Dk); return false === empty($knBKR); } private function canDisplayAddShipmentForm(array $SIdhZ) : bool { return "yes" === $this->settings["allowMultipleShipments"] || empty($SIdhZ); } private function getCurrentOrder() : ?WC_Order { global $post, $ubLBz, $O9cP0; if (!is_int($ubLBz)) { if (is_object($post) && isset($post->ID)) { $ubLBz = $post->ID; } else { $ubLBz = 0; } } if (!is_object($O9cP0)) { $O9cP0 = wc_get_order($ubLBz); if (!$O9cP0) { $O9cP0 = null; } } return $O9cP0; } private function displayNotices() : void { $FffjO = apply_filters($this->id . "_getErrorMessages", []); if (false === empty($FffjO)) { $this->notices->type = "error"; foreach ($FffjO as $fOp46) { $this->notices->add($fOp46); Cfgot: } ibglr: $this->notices->display(); } } private function isLocalOrder(WC_Order $knBKR) : bool { return apply_filters($this->id . "_isLocalOrder", false, $knBKR, $this->vendorId); } private function canCreateShipment(?WC_Order $knBKR) : bool { if (!is_object($knBKR)) { return false; } $ARWuK = true; if ($ARWuK && $this->settings["allowMultipleShipments"] !== "yes") { $SIdhZ = apply_filters($this->id . "_getOrderShipments", [], $knBKR->get_id(), '', $this->vendorId); $ARWuK = empty($SIdhZ); } if ($ARWuK && $this->settings["allowCreateShipmentFeature"] !== "yes") { $ARWuK = false; } $this->logger->debug(__FILE__, 996, "canCreateShipment: %s", $ARWuK ? "yes" : "no"); return $ARWuK; } private function createShipment(int $HM0Dk) : array { $this->logger->debug(__FILE__, 1009, "createShipment"); $bs3Qa = $this->getRequestedPackage($HM0Dk); if (empty($bs3Qa)) { $this->logger->debug(__FILE__, 1013, "No package in the request requested, can not continue"); $this->notices->add(__("Requested package is empty", $this->id)); $this->notices->display(); return []; } $WUB0W = $this->getServices(); if (empty($WUB0W)) { $this->logger->debug(__FILE__, 1022, "List of services is empty"); $this->notices->add(__("There are no available services", $this->id)); $this->notices->display(); return []; } $bs3Qa["services"] = $WUB0W; $N1jGU = new Form($this->getServicesFields($bs3Qa["services"])); $IhNNe = $N1jGU->filter($_POST); if (empty($IhNNe[$this->id . "_package"])) { $this->logger->debug(__FILE__, 1034, "Form validation has failed: %s", print_r($N1jGU->getErrors(), true)); $this->notices->add(implode("
", $N1jGU->getErrors())); $this->notices->display(); return []; } $D4jet = $IhNNe[$this->id . "_package"]; $bs3Qa = array_merge($bs3Qa, $D4jet); if (false === empty($bs3Qa["services"])) { unset($bs3Qa["services"]); } do_action($this->id . "_clearErrorMessages"); $J7zSn = apply_filters($this->id . "_createShipmentForParcel", [], $bs3Qa, $HM0Dk, $this->vendorId); if (empty($J7zSn["id"])) { $this->displayNotices(); return []; } $this->deletePackageCache($HM0Dk); return $J7zSn; } private function mustCreateShipment() : bool { $XE209 = false; if (apply_filters($this->id . "_hasCreateShipmentFeature", false)) { $XE209 = "yes" === $this->settings["requireToCreateShipment"]; } return $XE209; } private function mustPurchasePostage() : bool { return "yes" === $this->settings["requireToPurchasePostage"]; } private function getConfirmShipmentDetailsTemplate(bool $WSttQ = false) : string { $NfDmS = "<h4>" . __("Shipping Address", $this->id) . "</h4>" . "<table class="widefat">" . "<tr><th style="width: 30%"> " . __("Name", $this->id) . "</th><td>{_shipping_name}{_shipping_first_name} {_shipping_last_name}</td></tr>" . "<tr><th> " . __("Company", $this->id) . "</th><td>{_shipping_company}</td></tr>" . "<tr><th> " . __("Address 1", $this->id) . "</th><td>{_shipping_address_1}</td></tr>" . "<tr><th> " . __("Address 2", $this->id) . "</th><td>{_shipping_address_2}</td></tr>" . "<tr><th> " . __("City", $this->id) . "</th><td>{_shipping_city}</td></tr>" . "<tr><th> " . __("Postal Code", $this->id) . "</th><td>{_shipping_postcode}</td></tr>" . "<tr><th> " . __("Country", $this->id) . "</th><td>{_shipping_country}</td></tr>" . "<tr><th> " . __("State / County / Province", $this->id) . "</th><td>{_shipping_state}</td></tr>" . "<tr><th> " . __("Phone", $this->id) . "</th><td>{_billing_phone}</td></tr>" . "</table>" . "<h4>" . __("Package Details", $this->id) . "</h4>" . "<table class="widefat">" . "<tr><th style="width: 30%"> " . __("Service", $this->id) . "</th><td>{package[service]}</td></tr>"; if ("yes" === $this->settings["allowReturnLabelFeature"] && apply_filters($this->id . "_hasReturnLabelFeature", false)) { $NfDmS .= "<tr><th> " . __("Is Return Label?", $this->id) . "</th><td>{package[return]}</td></tr>"; } if (false === empty($this->contentTypes)) { $NfDmS .= "<tr><th> " . __("Contents", $this->id) . "</th><td>{package[contents]}</td></tr>"; } $NfDmS .= "<tr><th> " . __("Description", $this->id) . "</th><td>{package[description]}</td></tr>" . "<tr><th> " . __("Package Type", $this->id) . "</th><td>{package[type]}</td></tr>" . "<tr><th> " . __("Dimensions", $this->id) . "</th><td>L {package[length]} x W {package[width]} x H {package[height]} " . $this->dimensionUnit . "</td></tr>" . "<tr><th> " . __("Weight", $this->id) . "</th><td>{package[weight]} " . $this->weightUnit . "</td></tr>" . "<tr><th> " . __("Value", $this->id) . "</th><td>{package[currency]} {package[value]}</td></tr>" . "</table>"; return $NfDmS; } private function loadCachedSettings() : bool { $this->logger->debug(__FILE__, 1141, "loadCachedSettings"); $Gm1ya = false; if (!isset($_POST["settingsKey"]) || !wp_verify_nonce($_POST["settingsKey"], $this->id . "_settings")) { $z46WW = $_POST["settingsKey"]; $this->cache->setUseCache(true); $QiMfo = $this->cache->get($z46WW); $this->cache->setUseCache("yes" === $this->settings["cache"]); if (false === empty($QiMfo)) { $this->logger->debug(__FILE__, 1153, "Loaded cached settings: %s", print_r($QiMfo, true)); do_action($this->id . "_setSettings", $QiMfo); $Gm1ya = true; } } if (!$Gm1ya) { $this->logger->debug(__FILE__, 1161, "Cache is already gone"); $this->notices->add(__("Session has expired, please refresh the page", $this->id)); $this->notices->display(); } return $Gm1ya; } private function getRequestedOrderId() : int { if (!isset($_POST[$this->id . "_nonce"]) || !wp_verify_nonce($_POST[$this->id . "_nonce"], $this->id)) { $this->logger->debug(__FILE__, 1177, "Unable to verify request"); $this->notices->add(__("Unable to verify request", $this->id)); $this->notices->display(); return 0; } if (!isset($_POST["orderId"]) || !is_numeric($_POST["orderId"])) { $this->logger->debug(__FILE__, 1185, "Order ID is invalid"); $this->notices->add(__("Order ID is invalid", $this->id)); $this->notices->display(); return 0; } $HM0Dk = intval($_POST["orderId"]); $this->logger->debug(__FILE__, 1193, "Order ID: " . $HM0Dk); return $HM0Dk; } private function getRequestedShipmentId(bool $T_4K2 = true) : string { if (!isset($_POST["shipmentId"])) { $this->logger->debug(__FILE__, 1207, "Shipment ID is invalid"); if ($T_4K2) { $this->notices->add(__("Shipment ID is invalid", $this->id)); $this->notices->display(); } return ''; } $dq8oo = $_POST["shipmentId"]; $this->logger->debug(__FILE__, 1218, "Shipment ID: " . $dq8oo); return $dq8oo; } private function getRequestedPackage(int $HM0Dk) : array { $this->logger->debug(__FILE__, 1231, "getRequestedPackage: " . $HM0Dk); $WSttQ = false; $knBKR = wc_get_order($HM0Dk); if (is_object($knBKR)) { $WSttQ = $this->isLocalOrder($knBKR); } $t5RZR = $this->getServicesFields($this->getServices()); $t5RZR += $this->getAddShipmentFields($WSttQ); $N1jGU = new Form($t5RZR); $IhNNe = $N1jGU->filter($_POST); if (empty($IhNNe[$this->id . "_package"])) { $this->logger->debug(__FILE__, 1245, "Form validation errors: %s", print_r($N1jGU->getErrors(), true)); $KnHYQ = $N1jGU->getErrors(); foreach ($KnHYQ as $pYRug) { $this->notices->add($pYRug); Kq5xE: } PKCw7: $this->notices->display(); return []; } $bs3Qa = $IhNNe[$this->id . "_package"]; $this->logger->debug(__FILE__, 1257, "Submitted Package: %s", print_r($bs3Qa, true)); $r61_O = apply_filters($this->id . "_getOrderShipmentMeta", [], $HM0Dk, $this->vendorId); if (empty($bs3Qa["service"])) { $this->logger->debug(__FILE__, 1262, "Service is not set, so use default value"); if (false === empty($r61_O["service"])) { $bs3Qa["service"] = $r61_O["service"]; $this->logger->debug(__FILE__, 1267, "Use service from meta: " . $bs3Qa["service"]); } } $pq7YK = $this->getRequestedItemsInParcel(); if (false === empty($pq7YK)) { $bs3Qa["items"] = $pq7YK; } else { $this->logger->debug(__FILE__, 1275, "Items were not posted"); $CoIJQ = []; if (false === empty($r61_O["parcels"])) { $CoIJQ = $r61_O["parcels"]; } $ITdW6 = 0; if (isset($bs3Qa["parcelIdx"])) { $ITdW6 = $bs3Qa["parcelIdx"]; } if (false === empty($CoIJQ[$ITdW6]["items"])) { $bs3Qa["items"] = $CoIJQ[$ITdW6]["items"]; } else { $bs3Qa["items"] = []; } } $bs3Qa = apply_filters($this->id . "_preparePackageForOrder", $bs3Qa, $HM0Dk, $this->vendorId); if (empty($bs3Qa["destination"])) { $this->notices->add(__("Prepare has no destination", $this->id)); $this->notices->display(); return []; } if (apply_filters($this->id . "_hasOriginFeature", false) && empty($bs3Qa["origin"])) { $this->notices->add(__("Package has no origin", $this->id)); $this->notices->display(); return []; } $this->logger->debug(__FILE__, 1309, "Package: %s", print_r($bs3Qa, true)); return $bs3Qa; } private function getPackageCacheKey(int $HM0Dk) : string { return $this->id . "_package_" . $HM0Dk . "_" . $this->vendorId; } private function getRequestedItemsInParcel() : array { if (empty($_POST[$this->id . "_package"]["items"]) || !is_array($_POST[$this->id . "_package"]["items"])) { return []; } $yOh4W = $_POST[$this->id . "_package"]["items"]; $pq7YK = []; foreach ($yOh4W as $DSmzM) { if (empty($DSmzM["quantity"])) { goto qZGNy; } if (isset($DSmzM["id"])) { $Xa_kO = wc_get_product($DSmzM["id"]); if (empty($Xa_kO)) { $DSmzM = []; } else { $DSmzM["name"] = $DSmzM["name"] ?? $Xa_kO->get_name(); $DSmzM["weight"] = $DSmzM["weight"] ?? $Xa_kO->get_weight(); $DSmzM["length"] = $DSmzM["length"] ?? $Xa_kO->get_length(); $DSmzM["width"] = $DSmzM["width"] ?? $Xa_kO->get_width(); $DSmzM["height"] = $DSmzM["height"] ?? $Xa_kO->get_height(); } } if (isset($DSmzM["id"]) && isset($DSmzM["quantity"]) && isset($DSmzM["value"]) && wc_get_product($DSmzM["id"])) { $pq7YK[$DSmzM["id"]] = $DSmzM; } else { $this->notices->add(sprintf(__("Invalid item have been provided: %s", $this->id), print_r($DSmzM, true))); $this->notices->display(); return []; } qZGNy: } dwCYB: return $pq7YK; } private function getLinkShipmentFields() : array { $j3DSi = ["shipment_id" => ["id" => $this->id . "_shipment_id", "title" => __("Shipment", $this->id), "desc_tip" => __("What Shipment would like to link?", $this->id), "type" => "text", "placeholder" => __("eg. U7D5Y5A4A7", $this->id)]]; return $j3DSi; } private function getServicesFields(array $WUB0W) : array { $j3DSi = ["service" => ["id" => $this->id . "_package[service]", "title" => __("Service", $this->id), "desc_tip" => __("What service should be used for this package?", $this->id), "type" => "select", "options" => $WUB0W]]; return $j3DSi; } private function getAddShipmentFields(bool $WSttQ = false, array $T9XHH = []) : array { $j3DSi = []; if (false === empty($this->contentTypes)) { $j3DSi += ["contents" => ["id" => $this->id . "_package[contents]", "title" => __("Contents", $this->id), "desc_tip" => __("Contents of the package", $this->id), "type" => "select", "options" => $this->contentTypes, "default" => $this->settings["defaultContents"]]]; } $j3DSi += ["description" => ["id" => $this->id . "_package[description]", "title" => __("Description", $this->id), "placeholder" => __("Description for Customs", $this->id), "type" => "text", "desc_tip" => __("Description of the shipment contents", $this->id), "sanitize_function" => "sanitize_text_field", "optional" => true]]; if (false === empty($T9XHH)) { $j3DSi += ["parcelIdx" => ["id" => $this->id . "_package[parcelIdx]", "title" => __("Parcel Presets", $this->id), "desc_tip" => __("Select one of the parcels that plugin has used for packing this order", $this->id), "type" => "select", "options" => $T9XHH]]; } $ajCe5 = apply_filters($this->id . "_getPackageTypes", []); if (false === empty($ajCe5)) { $j3DSi += ["type" => ["id" => $this->id . "_package[type]", "title" => __("Package Type", $this->id), "desc_tip" => __("Type of the package", $this->id), "type" => "select", "options" => $ajCe5]]; } $j3DSi += ["length" => ["id" => $this->id . "_package[length]", "title" => __("Length", $this->id), "placeholder" => __("Length", $this->id), "type" => "number", "custom_attributes" => ["step" => "0.01"], "filter" => FILTER_VALIDATE_FLOAT, "desc_tip" => __("Length of the package", $this->id), "suffix" => $this->dimensionUnit], "width" => ["id" => $this->id . "_package[width]", "title" => __("Width", $this->id), "placeholder" => __("Width", $this->id), "type" => "number", "custom_attributes" => ["step" => "0.01"], "filter" => FILTER_VALIDATE_FLOAT, "desc_tip" => __("Width of the package", $this->id), "suffix" => $this->dimensionUnit], "height" => ["id" => $this->id . "_package[height]", "title" => __("Height", $this->id), "placeholder" => __("Height", $this->id), "type" => "number", "custom_attributes" => ["step" => "0.01"], "filter" => FILTER_VALIDATE_FLOAT, "desc_tip" => __("Height of the package", $this->id), "suffix" => $this->dimensionUnit], "weight" => ["id" => $this->id . "_package[weight]", "title" => __("Weight", $this->id), "placeholder" => __("Weight", $this->id), "type" => "number", "custom_attributes" => ["step" => "0.01"], "filter" => FILTER_VALIDATE_FLOAT, "desc_tip" => __("Weight of the package", $this->id), "suffix" => $this->weightUnit]]; if (apply_filters($this->id . "_hasFreightClassFeature", false)) { $j3DSi += ["freightClass" => ["id" => $this->id . "_package[freightClass]", "title" => __("Freight Class", $this->id), "desc_tip" => __("Estimated freight class number", $this->id), "type" => "select", "options" => [50 => __("Class 50", $this->id), 55 => __("Class 55", $this->id), 60 => __("Class 60", $this->id), 65 => __("Class 65", $this->id), 70 => __("Class 70", $this->id), 77.5 => __("Class 77.5", $this->id), 85 => __("Class 85", $this->id), 92.5 => __("Class 92.5", $this->id), 100 => __("Class 100", $this->id), 110 => __("Class 110", $this->id), 125 => __("Class 125", $this->id), 150 => __("Class 150", $this->id), 175 => __("Class 175", $this->id), 200 => __("Class 200", $this->id), 250 => __("Class 250", $this->id), 300 => __("Class 300", $this->id), 400 => __("Class 400", $this->id), 500 => __("Class 500", $this->id)]]]; } $YLUol = apply_filters($this->id . "_getCurrencies", []); if (false === empty($YLUol)) { $j3DSi += ["currency" => ["id" => $this->id . "_package[currency]", "title" => __("Currency", $this->id), "desc_tip" => __("Currency of the package value", $this->id), "type" => "select", "options" => $YLUol, "default" => apply_filters($this->id . "_getDefaultCurrency", '')]]; } $j3DSi += ["value" => ["id" => $this->id . "_package[value]", "title" => __("Value", $this->id), "placeholder" => __("Value", $this->id), "type" => "number", "custom_attributes" => ["step" => "0.01"], "filter" => FILTER_VALIDATE_FLOAT, "optional" => true, "desc_tip" => __("Value of the package", $this->id)]]; $j3DSi += $this->getSignatureFields(); $j3DSi += $this->getCodFields(); if ("yes" === $this->settings["allowInsuranceFeature"] && apply_filters($this->id . "_hasInsuranceFeature", false)) { $j3DSi += ["insurance" => ["id" => $this->id . "_package[insurance]", "title" => __("Include Insurance", $this->id), "type" => "checkbox"]]; } if ("yes" === $this->settings["allowSaturdayDeliveryFeature"] && apply_filters($this->id . "_hasSaturdayDeliveryFeature", false)) { $j3DSi += ["saturday_delivery" => ["id" => $this->id . "_package[saturday_delivery]", "title" => __("Satuday Delivery", $this->id), "type" => "checkbox"]]; } if ("yes" === $this->settings["allowHoldForPickupFeature"] && apply_filters($this->id . "_hasHoldForPickupFeature", false)) { $j3DSi += ["hold_for_pickup" => ["id" => $this->id . "_package[hold_for_pickup]", "title" => __("Hold For Pickup", $this->id), "type" => "checkbox"]]; } if ("yes" === $this->settings["allowAlcoholFeature"] && apply_filters($this->id . "_hasAlcoholFeature", false)) { $j3DSi += ["alcohol" => ["id" => $this->id . "_package[alcohol]", "title" => __("Alcohol", $this->id), "type" => "checkbox"]]; } if ("yes" === $this->settings["allowDryIceFeature"] && apply_filters($this->id . "_hasDryIceFeature", false)) { $j3DSi += ["dryIce" => ["id" => $this->id . "_package[dryIce]", "title" => __("Dry Ice", $this->id), "type" => "checkbox"]]; } if ("yes" === $this->settings["allowMediaMailFeature"] && apply_filters($this->id . "_hasMediaMailFeature", false)) { $j3DSi += ["mediaMail" => ["id" => $this->id . "_package[mediaMail]", "title" => __("Media Mail", $this->id), "type" => "checkbox", "default" => $this->settings["mediaMail"] === "only" ? "yes" : "no"]]; } if ("yes" === $this->settings["allowReturnLabelFeature"] && apply_filters($this->id . "_hasReturnLabelFeature", false)) { $j3DSi += ["return" => ["id" => $this->id . "_package[return]", "title" => __("Return Label", $this->id), "type" => "checkbox", "default" => "no"]]; } return $j3DSi; } private function getCodFields() : array { if ("yes" !== $this->settings["allowCodFeature"] || false === apply_filters($this->id . "_hasCodFeature", false)) { return []; } $j3DSi = ["cod" => ["id" => $this->id . "_package[cod]", "title" => __("Cash on Delivery", $this->id), "type" => "checkbox", "default" => $this->settings["cod"]]]; $KYCjx = apply_filters($this->id . "_getCodMethods", []); if (false === empty($KYCjx)) { $j3DSi += ["cod_method" => ["id" => $this->id . "_package[cod_method]", "title" => __("COD Method", $this->id), "type" => "select", "options" => $KYCjx, "default" => $this->settings["cod_method"], "class" => "cod_field"]]; } $j3DSi += ["cod_amount" => ["id" => $this->id . "_package[cod_amount]", "title" => __("COD Amount", $this->id), "placeholder" => __("Value", $this->id), "type" => "number", "custom_attributes" => ["step" => "0.01"], "filter" => FILTER_VALIDATE_FLOAT, "optional" => true, "desc_tip" => __("Amount that has to be collected", $this->id), "class" => "cod_field"]]; return $j3DSi; } private function getSignatureFields() : array { if ("yes" !== $this->settings["allowSignatureFeature"] || !apply_filters($this->id . "_hasSignatureFeature", false)) { return []; } $j3DSi = []; $vPLUx = apply_filters($this->id . "_getSignatureTypes", []); if (false === empty($vPLUx)) { $j3DSi = ["signature_type" => ["id" => $this->id . "_package[signature_type]", "title" => __("Signature Type", $this->id), "type" => "select", "options" => $vPLUx]]; } else { $j3DSi = ["signature" => ["id" => $this->id . "_package[signature]", "title" => __("Signature Required", $this->id), "type" => "checkbox"]]; } return $j3DSi; } private function displayAddShipmentForm(array $bs3Qa, bool $WSttQ, bool $EvwTZ, bool $HiNiO = true) : void { if ($this->settings["allowCreateShipmentFeature"] !== "yes") { return; } if (empty($bs3Qa)) { $bs3Qa = []; } $bs3Qa = array_merge(["width" => '', "height" => '', "length" => '', "weight" => ''], $bs3Qa); $T9XHH = []; if (false === empty($bs3Qa["parcels"]) && is_array($bs3Qa["parcels"])) { $CoIJQ =& $bs3Qa["parcels"]; foreach ((array) $CoIJQ as $ITdW6 => $NiaEJ) { $T9XHH[$ITdW6] = sprintf("%s (%s x %s x %s %s)", $NiaEJ["boxName"], $NiaEJ["length"], $NiaEJ["width"], $NiaEJ["height"], $this->dimensionUnit); APj9l: } PvtuK: } echo sprintf("<div class="addShipmentForm shipmentMetaBoxForm %s" style="display: %s;">", $EvwTZ ? "skipFetchShippingRates" : '', $HiNiO ? "block" : "none"); echo sprintf("<p>%s</p>", __("Please verify list of the items, dimensions of the parcel, total weight, value and shipping address of the order before continuing.", $this->id)); echo "<table class="form-table">"; if (false === empty($bs3Qa["services"]) && is_array($bs3Qa["services"])) { $A1dyo = new Form($this->getServicesFields((array) $bs3Qa["services"])); $A1dyo->display([$this->id . "_package" => $bs3Qa]); } $WdpYA = new Form($this->getAddShipmentFields($WSttQ, $T9XHH)); $WdpYA->display([$this->id . "_package" => $bs3Qa]); echo "</table>"; echo sprintf("<button type="button" class="button fetchShippingRates" style="display: %s;">%s</button>", empty($bs3Qa["services"]) ? "inline-block" : "none", __("Get a Quote", $this->id)); if ($this->mustCreateShipment()) { echo sprintf("<button type="button" class="button createShipment" style="display: %s;">%s</button>", false === empty($bs3Qa["services"]) ? "inline-block" : "none", __("Create Shipment", $this->id)); } elseif ($this->mustPurchasePostage()) { echo sprintf("<button type="button" class="button buyShipment" style="display: %s;">%s</button>", false === empty($bs3Qa["services"]) ? "inline-block" : "none", __("Buy Shipping Label", $this->id)); } else { echo sprintf("<button type="button" class="button buyShipment download" style="display: %s;">%s</button>", false === empty($bs3Qa["services"]) ? "inline-block" : "none", __("Print Shipping Label", $this->id)); } echo sprintf("<button type="button" class="button cancelCreateShipment">%s</button>", __("Cancel", $this->id)); echo "</div>"; } private function displayLinkShipmentForm() : void { if ($this->settings["allowLinkFeature"] !== "yes" || !apply_filters($this->id . "_hasLinkShipmentFeature", false)) { return; } echo "<div class="linkShipmentForm shipmentMetaBoxForm" style="display: none;">"; echo "<table class="form-table">"; $gI4Ez = new Form($this->getLinkShipmentFields()); $gI4Ez->display(); echo "</table>"; echo sprintf("<button type="button" class="button linkShipment">%s</button>", __("Link Shipment", $this->id)); echo sprintf("<button type="button" class="button cancelCreateShipment">%s</button>", __("Cancel", $this->id)); echo "</div>"; } private function displayActionButtons(bool $HiNiO = false) : void { if ("yes" === $this->settings["allowCreateShipmentFeature"]) { echo sprintf("<button type="button" class="button showAddShipment" style="display: %s;">%s</button> ", $HiNiO ? "none" : "inline-block", __("Create Shipping Label", $this->id)); } if ("yes" === $this->settings["allowLinkFeature"] && apply_filters($this->id . "_hasLinkShipmentFeature", false)) { echo sprintf("<button type="button" class="button showLinkShipment" style="display: %s;">%s</button> ", $HiNiO ? "none" : "inline-block", __("Link Existing Shipment", $this->id)); } } private function displayShipmentDetails(array $J7zSn, bool $HiNiO = true) : void { $this->logger->debug(__FILE__, 1890, "displayShipmentDetails, shipment: %s", print_r($J7zSn, true)); if (empty($J7zSn) || empty($J7zSn["id"])) { return; } echo sprintf("<div class="shipmentDetails" data-shipment_id="%s" style="display: %s;">", $J7zSn["id"], $HiNiO ? "block" : "none"); $m5GJU = apply_filters($this->id . "_getShipmentUrl", '', $J7zSn); if (false === empty($m5GJU)) { echo "<p style="word-wrap: break-word;">"; echo sprintf("<strong>%s</strong>", __("Shipment:", $this->id)); echo sprintf(" <a href="%s" %s>%s</a>", empty($m5GJU) ? "#" : $m5GJU, false === empty($m5GJU) ? "target="_blank"" : '', $J7zSn["id"]); echo "</p>"; echo "<hr/>"; } if (false === empty($J7zSn["service"]) && false === empty($J7zSn["rates"][$J7zSn["service"]])) { $G9qXm = $J7zSn["rates"][$J7zSn["service"]]; echo sprintf("<div><strong>%s</strong></div>", $G9qXm["postage_description"]); if (false === empty($G9qXm["delivery_time_description"])) { echo sprintf("<div><small>%s</small></div>", $G9qXm["delivery_time_description"]); } if (false === empty($G9qXm["tracking_type_description"])) { echo sprintf("<div><small>%s</small></div>", $G9qXm["tracking_type_description"]); } } elseif (false === empty($J7zSn["service"])) { $fpDPG = apply_filters($this->id . "_service_name", '', $J7zSn["service"]); if (false === empty($fpDPG)) { echo sprintf("<div><strong>%s</strong></div>", $fpDPG); } } do_action($this->id . "_before_admin_shipment_details", $J7zSn); if (false === empty($J7zSn["carrier_tracking_code"]) && false === empty($J7zSn["tracking_url"])) { echo sprintf("<p><strong>%s</strong> <a href="%s" target="_blank">%s</a></p>", __("Tracking:", $this->id), $J7zSn["tracking_url"], $J7zSn["carrier_tracking_code"]); } elseif (false === empty($J7zSn["carrier_tracking_code"])) { echo sprintf("<p><strong>%s</strong> %s</p>", __("Tracking:", $this->id), $J7zSn["carrier_tracking_code"]); } if (false === empty($J7zSn["status_name"])) { echo sprintf("<p><strong>%s</strong> <span>%s</span></p>", __("Status:", $this->id), $J7zSn["status_name"]); } if (false === empty($J7zSn["tracking_events"])) { echo "<hr/>"; foreach ($J7zSn["tracking_events"] as $RrvMU => $G7Eqo) { if ($RrvMU > 0) { echo "<br/>"; } echo "<div>"; if (false === empty($G7Eqo["title"])) { echo sprintf("<strong>%s</strong>", $G7Eqo["title"]); if (false === empty($G7Eqo["subtitle"]) || false === empty($G7Eqo["created_at"])) { echo "<br/>"; } } if (false === empty($G7Eqo["subtitle"])) { echo sprintf("<small>%s</small>", $G7Eqo["subtitle"]); if (false === empty($G7Eqo["created_at"])) { echo "<br/>"; } } if (false === empty($G7Eqo["created_at"])) { echo sprintf("<small>%s</small>", $G7Eqo["created_at"]); } echo "</div>"; d1ciD: } Kn8nV: } $KYHJJ = ''; if (false === empty($J7zSn["postage_label_png_url"])) { $KYHJJ .= sprintf("<a href="%s" target="_blank">%s</a>", $J7zSn["postage_label_png_url"], __("PNG", $this->id)); } if (false === empty($J7zSn["postage_label_pdf_url"])) { if (false === empty($KYHJJ)) { $KYHJJ .= " | "; } $KYHJJ .= sprintf("<a href="%s" target="_blank">%s</a>", $J7zSn["postage_label_pdf_url"], __("PDF", $this->id)); } if (empty($KYHJJ) && false === empty($J7zSn["postage_label"])) { foreach ($J7zSn["postage_label"] as $pwu88) { if (false === empty($KYHJJ)) { $KYHJJ .= " | "; } $KYHJJ .= sprintf("<a href="%s" data-shipment_id="%s" class="download" target="_blank">%s</a>", $pwu88["url"], $J7zSn["id"], strtoupper($pwu88["file_type"] ?? $pwu88["fileType"] ?? "pdf")); Mc5VZ: } VDmfz: } if (false === empty($KYHJJ)) { echo "<hr/>"; echo sprintf("<p><strong>%s</strong> %s</p>", __("Label:", $this->id), $KYHJJ); } if (false === empty($J7zSn["forms"])) { echo "<hr/>"; echo sprintf("<p><strong>%s</strong><br/>", __("Forms:", $this->id)); foreach ($J7zSn["forms"] as $wjk5v) { $VlSUk = strtoupper(preg_replace("/_/", " ", $wjk5v["document_type"] ?? $wjk5v["type"])); echo sprintf("- <a href="%s" target="_blank">%s</a><br/>", $wjk5v["url"], $VlSUk); HbTjE: } mrsvm: echo "</p>"; } echo "<hr/>"; $fPYvP = false; if (apply_filters($this->id . "_hasGetShipmentFeature", false)) { echo sprintf("<p><a href="#" data-shipment_id="%s" class="refreshShipment">%s</a></p>", $J7zSn["id"], __("Refresh >", $this->id)); $fPYvP = true; } if ("yes" === $this->settings["allowDeleteFeature"] && apply_filters($this->id . "_canCancel", false, $J7zSn)) { echo sprintf("<p><a href="#" data-shipment_id="%s" class="cancelShipment">%s</a></p>", $J7zSn["id"], __("Cancel Shipment >", $this->id)); $fPYvP = true; } if ("yes" === $this->settings["allowUnlinkFeature"] && apply_filters($this->id . "_canUnlink", true, $J7zSn)) { echo sprintf("<p><a href="#" data-shipment_id="%s" class="unlinkShipment">%s</a></p>", $J7zSn["id"], __("Unlink Shipment >", $this->id)); $fPYvP = true; } if ("yes" === $this->settings["allowRefundFeature"] && apply_filters($this->id . "_canRefund", false, $J7zSn)) { echo sprintf("<p><a href="#" data-shipment_id="%s" class="refundShipment">%s</a></p>", $J7zSn["id"], __("Request a Refund >", $this->id)); $fPYvP = true; } if (apply_filters($this->id . "_canBuy", false, $J7zSn)) { echo sprintf("<p><a href="#" data-shipment_id="%s" class="buyShipment">%s</a></p>", $J7zSn["id"], __("Buy Shipping Label >", $this->id)); $fPYvP = true; } if ($fPYvP) { echo "<hr/>"; } echo "</div>"; } private function prepareParcels(array $CoIJQ) : array { if (empty($CoIJQ)) { return []; } foreach ($CoIJQ as $ITdW6 => $NiaEJ) { if (empty($NiaEJ["boxName"]) && false === empty($NiaEJ["name"])) { $NiaEJ["boxName"] = $NiaEJ["name"]; } $NiaEJ["boxName"] .= sprintf(" (%s)", __("detected", $this->id)); unset($NiaEJ["currency"]); $CoIJQ[$ITdW6] = $NiaEJ; bNJrz: } ZoqDG: foreach ((array) $this->settings["boxes"] as $hfdgv) { if ("yes" === $hfdgv["enabled"]) { unset($hfdgv["weight"]); $hfdgv["boxName"] .= sprintf(" (%s)", __("preset", $this->id)); $CoIJQ[] = $hfdgv; } lUWjp: } hip3E: $this->logger->debug(__FILE__, 2131, "Parcels: %s", print_r($CoIJQ, true)); return $CoIJQ; } private function getServices() : array { return apply_filters($this->id . "_getServices", []); } private function deletePackageCache(int $HM0Dk) : void { $this->cache->delete($this->getPackageCacheKey($HM0Dk)); } private function setPackageCache(int $HM0Dk, array $bs3Qa) : void { $this->cache->set($this->getPackageCacheKey($HM0Dk), $bs3Qa, self::CACHE_EXPIRATION_IN_SECONDS); } private function getPackageCache(int $HM0Dk) : array { $this->cache->setUseCache(true); $bs3Qa = $this->cache->get($this->getPackageCacheKey($HM0Dk)) ?? []; $this->cache->setUseCache("yes" === $this->settings["cache"]); return $bs3Qa; } private function setVendorId(int $z8b7C) : void { if ($this->vendorId === $z8b7C) { return; } $this->logger->debug(__FILE__, 2196, "setVendorId: " . $z8b7C); $this->vendorId = $z8b7C; $this->vendorSettingsLoader->withVendorId($z8b7C)->load(); } } 
 ?>

Did this file decode correctly?

Original Code

<?php
 declare (strict_types=1); namespace OneTeamSoftware\WC\Shipping; use OneTeamSoftware\Cache\CacheInterface; use OneTeamSoftware\LazyClassProxy\LazyClassProxy; use OneTeamSoftware\Logger\LoggerInterface; use OneTeamSoftware\WC\Admin\Form\Form; use OneTeamSoftware\WP\Admin\MetaBox\AbstractMetaBox; use OneTeamSoftware\WP\Admin\Notices\Notices; use WC_Order; use WP_Post; class ShipmentMetaBox extends AbstractMetaBox { private const CACHE_EXPIRATION_IN_SECONDS = 48 * 60 * 60; private $pluginPath; private $settings; private $version; private $weightUnit; private $dimensionUnit; private $notices; private $contentTypes; private $logger; private $cache; private $vendorSettingsLoader; private $vendorId; public function __construct(string $zDsBP, string $HWG_F, LoggerInterface $j8tRa, CacheInterface $ZUcN0, VendorSettingsLoader $Br9M_, array $QiMfo, string $fpjGg = null) { parent::__construct($zDsBP, sprintf(__("\x25\163\x20\x53\150\151\160\x6d\145\x6e\x74", $zDsBP), apply_filters($zDsBP . "\137\x67\145\x74\116\141\155\x65", '')), ["\163\150\157\x70\137\x6f\162\x64\x65\162"], "\163\151\144\145", "\150\x69\147\150"); $this->pluginPath = $HWG_F; $this->contentTypes = apply_filters($this->id . "\x5f\x67\145\x74\103\x6f\156\164\145\156\x74\124\171\160\x65\163", []); $this->settings = array_merge(["\x63\141\143\150\145" => "\x79\145\x73", "\x63\x61\143\x68\145\x45\170\x70\151\x72\x61\164\151\157\x6e\111\156\123\x65\143\x73" => 10 * 60, "\141\154\154\x6f\167\115\165\x6c\x74\x69\x70\154\145\x53\x68\151\160\x6d\145\156\164\163" => "\171\x65\x73", "\x61\x6c\154\x6f\167\x43\x72\x65\141\x74\145\x53\x68\151\x70\155\x65\x6e\164\x46\145\141\x74\165\162\x65" => "\171\145\163", "\141\x6c\154\x6f\167\x4c\151\x6e\153\x46\145\x61\164\165\x72\145" => "\171\x65\x73", "\x61\154\x6c\x6f\x77\x55\x6e\154\151\x6e\153\106\145\x61\164\x75\162\145" => "\171\145\163", "\x61\x6c\154\157\167\104\145\x6c\145\x74\x65\x46\145\x61\164\x75\162\145" => "\x79\x65\x73", "\x61\154\154\x6f\x77\x52\x65\146\x75\156\144\x46\x65\x61\x74\165\162\145" => "\171\145\163", "\x61\x6c\x6c\157\x77\x52\x65\164\x75\x72\156\x4c\141\142\145\154\x46\145\x61\x74\165\162\x65" => "\x79\145\x73", "\x61\154\154\x6f\167\115\x65\x64\x69\141\115\x61\151\x6c\106\x65\141\x74\165\x72\145" => "\x79\x65\163", "\x61\x6c\x6c\x6f\167\x43\x6f\x64\x46\145\141\x74\165\x72\145" => "\171\x65\x73", "\x61\x6c\154\157\x77\x49\x6e\x73\x75\x72\x61\x6e\x63\x65\x46\x65\141\x74\x75\x72\145" => "\171\145\x73", "\141\154\x6c\x6f\x77\x53\x69\x67\156\141\x74\x75\162\x65\x46\145\x61\164\x75\x72\145" => "\x79\x65\163", "\141\x6c\x6c\157\167\123\x61\x74\x75\x72\144\141\171\x44\145\154\151\x76\x65\162\171\106\145\141\164\165\x72\x65" => "\171\145\x73", "\x61\x6c\154\x6f\x77\110\x6f\154\144\x46\157\162\x50\x69\x63\x6b\165\160\106\145\141\164\x75\x72\x65" => "\171\x65\x73", "\141\x6c\x6c\157\167\x41\154\x63\x6f\x68\157\154\x46\x65\x61\x74\165\x72\145" => "\171\x65\x73", "\x61\x6c\154\x6f\x77\104\x72\x79\111\143\145\106\x65\141\164\165\162\145" => "\x79\145\x73", "\x61\x6c\154\x6f\167\124\x6f\105\x78\x63\x65\x65\x64\x53\150\x69\x70\x70\151\156\x67\x54\157\x74\141\x6c" => "\x79\x65\x73", "\162\x65\161\165\x69\162\x65\x54\157\x46\x65\164\x63\150\123\x68\x69\x70\x70\151\156\x67\x52\141\x74\145\163" => "\171\145\x73", "\162\145\x71\x75\151\162\x65\124\x6f\x43\162\x65\x61\x74\145\x53\x68\x69\160\x6d\145\156\164" => "\x6e\x6f", "\162\x65\161\x75\x69\x72\145\x54\x6f\120\x75\162\143\x68\141\x73\145\120\x6f\163\164\141\x67\145" => "\x6e\x6f", "\162\x65\161\165\151\x72\145\124\157\103\157\156\x66\151\162\x6d\123\150\x69\x70\155\145\156\164\x44\145\x74\141\x69\154\x73" => "\171\x65\x73", "\x63\157\x64" => "\156\157", "\x63\157\x64\x5f\155\145\164\150\x6f\x64" => '', "\151\x6e\x73\x75\162\x61\x6e\143\145" => "\x6e\x6f", "\x73\x69\x67\156\141\x74\x75\162\x65" => "\156\x6f", "\x6d\145\144\x69\x61\115\141\x69\154" => "\x65\x78\x63\x6c\x75\x64\145", "\144\145\146\x61\165\154\x74\123\150\x69\160\155\145\x6e\x74\x44\x65\163\x63\162\x69\x70\164\151\157\x6e" => '', "\x64\x65\146\x61\165\154\x74\x54\141\162\151\146\146" => '', "\x64\145\x66\x61\165\x6c\164\x43\x6f\165\x6e\164\x72\171\x4f\x66\x4f\162\x69\147\x69\x6e" => '', "\x62\x6f\x78\145\x73" => [], "\x64\145\146\x61\165\x6c\x74\x43\x6f\x6e\x74\x65\x6e\x74\163" => current(array_keys($this->contentTypes)), "\x76\x65\156\144\x6f\x72\137\x69\x64" => 0, "\x77\145\x69\x67\x68\164\x5f\165\x6e\x69\164" => "\x67", "\x64\x69\155\145\x6e\x73\x69\157\156\x5f\165\156\151\x74" => "\x6d\x6d"], $QiMfo); $this->version = $fpjGg; $this->weightUnit = $this->settings["\167\145\151\x67\150\x74\x5f\165\156\151\x74"]; $this->dimensionUnit = $this->settings["\x64\x69\x6d\x65\x6e\163\151\x6f\x6e\137\x75\156\151\x74"]; $this->notices = new Notices($this->id); $this->logger = $j8tRa; $this->cache = $ZUcN0; $this->vendorSettingsLoader = $Br9M_; $this->vendorId = 0; } public function register() : void { add_action($this->id . "\137\x64\x69\x73\160\154\x61\171\x53\150\151\x70\155\145\x6e\x74\x4d\145\164\x61\x42\x6f\x78", [$this, "\144\151\x73\x70\x6c\x61\x79\106\157\x72\x50\157\x73\x74"], 1, 2); add_action("\167\x70\x5f\141\x6a\141\x78\137" . $this->id . "\137\x66\145\x74\x63\150\123\150\151\x70\x70\151\x6e\147\122\x61\x74\x65\163", [$this, "\157\x6e\106\x65\164\x63\150\x52\141\x74\x65\163"]); add_action("\x77\x70\137\141\152\141\170\137" . $this->id . "\137\143\x72\145\x61\164\145\123\x68\x69\x70\x6d\x65\x6e\164", [$this, "\157\x6e\x43\162\145\141\164\x65\x53\150\151\160\x6d\x65\156\164"]); add_action("\x77\x70\x5f\x61\x6a\141\170\137" . $this->id . "\x5f\x63\141\156\x63\x65\x6c\103\162\145\141\164\x65\123\x68\151\160\x6d\145\156\x74", [$this, "\157\x6e\x43\x61\156\143\145\x6c\x43\x72\145\x61\164\145\x53\x68\151\160\x6d\145\156\164"]); add_action("\x77\160\137\141\x6a\141\170\137" . $this->id . "\x5f\162\145\x66\165\156\144\x53\150\x69\160\155\x65\156\164", [$this, "\x6f\156\x52\x65\146\x75\x6e\x64\123\x68\x69\160\x6d\145\x6e\x74"]); add_action("\x77\x70\137\x61\152\141\x78\137" . $this->id . "\x5f\143\x61\156\143\x65\x6c\123\x68\x69\x70\155\x65\x6e\164", [$this, "\157\156\103\141\156\143\x65\154\123\150\x69\x70\x6d\145\x6e\x74"]); add_action("\167\160\x5f\141\x6a\141\170\x5f" . $this->id . "\x5f\x75\156\x6c\x69\156\153\x53\x68\151\x70\155\x65\x6e\x74", [$this, "\x6f\x6e\x55\156\154\151\156\x6b\x53\x68\151\160\x6d\x65\156\164"]); add_action("\x77\x70\x5f\x61\x6a\x61\x78\137" . $this->id . "\137\142\165\171\x53\x68\151\160\x6d\145\x6e\164", [$this, "\157\x6e\x42\x75\171\x53\150\x69\160\x6d\x65\156\164"]); add_action("\x77\x70\x5f\x61\152\141\170\137" . $this->id . "\x5f\162\145\146\162\x65\x73\x68\x53\x68\x69\160\155\145\156\164", [$this, "\x6f\156\x52\x65\146\x72\x65\x73\x68\x53\x68\151\x70\x6d\145\156\x74"]); add_action("\x77\157\x6f\143\157\155\x6d\x65\x72\143\x65\x5f\141\x64\x6d\x69\x6e\x5f\157\162\x64\145\x72\x5f\151\164\x65\155\x5f\x68\x65\141\144\145\x72\163", [$this, "\157\156\117\162\x64\x65\x72\111\x74\x65\x6d\110\x65\x61\x64\145\x72\163"], 1, 1); add_action("\167\x6f\x6f\143\157\x6d\155\x65\162\x63\x65\x5f\141\144\155\151\156\137\x6f\x72\x64\145\x72\137\x69\164\x65\x6d\137\166\x61\x6c\x75\x65\163", [$this, "\x6f\x6e\117\x72\x64\145\162\111\164\x65\155\x56\141\x6c\165\145\x73"], 1, 3); add_action("\167\157\157\x63\x6f\155\x6d\x65\x72\143\x65\x5f\142\x65\x66\x6f\162\x65\137\157\162\x64\145\162\137\x69\164\x65\155\155\x65\x74\141", [$this, "\x6f\x6e\102\x65\x66\x6f\162\145\117\x72\144\145\162\x49\x74\x65\x6d\x4d\145\x74\x61"], 1, 3); } public function displayForPost(int $I_bHg, int $z8b7C = 0) : void { $this->logger->debug(__FILE__, 204, "\144\x69\163\160\x6c\141\x79\106\157\162\x50\x6f\163\x74\x2c\x20\160\x6f\x73\x74\111\x64\x3a\x20" . $I_bHg . "\x2c\x20\x76\145\156\x64\157\162\111\x64\x3a\40" . $z8b7C); $post = get_post($I_bHg); if (empty($post)) { return; } if (false === empty($this->postTypes) && !in_array($post->post_type, (array) $this->postTypes, true)) { return; } $this->setVendorId($z8b7C); $this->onCreateMetaBox($post); } public function setSettings(array $QiMfo) : void { $this->settings = array_merge($this->settings, $QiMfo); if (false === empty($this->settings["\166\x65\x6e\x64\157\162\137\x69\x64"])) { $this->setVendorId($this->settings["\x76\x65\156\x64\x6f\x72\x5f\x69\144"]); } } public function enqueueScripts(array $QiMfo = []) : void { $J1ZmM = "\x6d\x69\156\x2e\x63\x73\x73"; $jenWR = "\x6d\x69\x6e\56\x6a\x73"; if (defined("\x57\x50\137\104\105\102\x55\107") && WP_DEBUG) { $J1ZmM = "\x63\x73\x73"; $jenWR = "\152\163"; } wp_register_style($this->id . "\55\x73\x77\151\164\x63\x68\x69\x66\x79", plugins_url("\141\x73\163\145\x74\163\57\x63\x73\163\57\163\167\151\x74\143\150\151\x66\171\x2e" . $J1ZmM, str_replace("\x70\150\x61\x72\72\x2f\57", '', $this->pluginPath)), [], $this->version); wp_enqueue_style($this->id . "\x2d\163\167\x69\164\143\x68\151\146\171"); wp_register_script($this->id . "\55\163\x77\151\x74\x63\150\151\146\x79", plugins_url("\x61\x73\x73\145\x74\163\x2f\x6a\163\x2f\x73\167\x69\164\143\x68\x69\x66\x79\56" . $jenWR, str_replace("\160\x68\x61\x72\x3a\57\57", '', $this->pluginPath)), ["\x6a\161\x75\x65\162\171"], $this->version); wp_enqueue_script($this->id . "\55\x73\x77\151\x74\143\150\151\x66\171"); wp_register_script($this->id . "\x2d\154\141\x62\x65\154\154\157\x61\x64\145\x72\160\141\147\x65", plugins_url("\141\x73\x73\145\164\x73\x2f\152\x73\x2f\114\x61\x62\x65\x6c\x4c\157\x61\x64\x65\x72\120\141\147\x65\x2e" . $jenWR, str_replace("\160\x68\x61\162\72\57\x2f", '', $this->pluginPath)), ["\152\161\165\145\x72\171", "\x6a\x71\x75\145\x72\171\x2d\142\x6c\x6f\143\x6b\165\151"], $this->version); wp_enqueue_script($this->id . "\55\154\141\142\x65\x6c\154\157\x61\x64\145\162\x70\x61\x67\x65"); wp_register_style($this->id . "\55\x73\150\x69\160\x6d\145\x6e\164\x6d\x65\164\141\x62\157\170", plugins_url("\141\163\x73\x65\164\163\x2f\x63\163\163\57\x53\x68\x69\x70\x6d\x65\156\164\115\145\164\141\x42\157\x78\56" . $J1ZmM, str_replace("\x70\x68\x61\162\72\x2f\x2f", '', $this->pluginPath)), ["\x77\160\x2d\152\161\165\145\x72\x79\55\165\151\55\x64\x69\x61\154\x6f\x67"], $this->version); wp_enqueue_style($this->id . "\x2d\163\x68\x69\160\x6d\145\156\164\155\145\164\x61\x62\157\170"); wp_register_script($this->id . "\x2d\x73\150\151\160\x6d\145\x6e\x74\x6d\x65\x74\141\142\x6f\170", plugins_url("\x61\163\x73\145\x74\x73\57\x6a\163\57\x53\x68\x69\160\x6d\x65\x6e\x74\x4d\145\x74\x61\102\x6f\170\x2e" . $jenWR, str_replace("\160\150\141\162\72\x2f\57", '', $this->pluginPath)), ["\152\x71\165\x65\162\171", "\x6a\x71\x75\145\162\171\55\142\154\x6f\143\x6b\x75\x69", "\x6a\161\x75\x65\162\171\x2d\x75\x69\x2d\144\151\141\x6c\157\147"], $this->version); wp_enqueue_script($this->id . "\x2d\163\150\x69\160\155\x65\x6e\x74\x6d\145\164\141\142\x6f\170"); wp_localize_script($this->id . "\x2d\163\150\x69\x70\155\145\156\164\155\145\164\141\142\157\x78", "\163\150\151\x70\x6d\x65\156\x74\155\145\164\141\x62\157\x78\x5f\x73\145\x74\164\151\156\147\x73", $QiMfo); } public function onOrderItemHeaders(?WC_Order $knBKR) : void { if (!$this->canCreateShipment($knBKR)) { return; } $this->logger->debug(__FILE__, 305, "\157\x6e\117\162\144\x65\x72\x49\x74\x65\x6d\110\145\141\144\x65\x72\x73\x2c\x20\x6f\x72\144\x65\162\111\x64\72\40\x25\144", $knBKR->get_id()); echo sprintf("\x3c\164\150\40\143\x6c\x61\163\x73\75\x22\45\x73\x20\x69\164\145\x6d\163\x49\x6e\120\x61\x72\x63\145\x6c\40\166\x61\154\165\145\40\x73\157\x72\x74\x61\142\x6c\145\42\x20\144\141\x74\x61\x2d\x73\x6f\x72\164\x3d\x22\146\x6c\x6f\x61\x74\42\40\163\164\171\x6c\145\x3d\42\x64\x69\x73\160\154\x61\171\72\x20\156\157\x6e\x65\73\42\76\45\163\74\x2f\x74\150\76", $this->id, __("\x56\141\x6c\x75\145", $this->id)); echo sprintf("\74\x74\150\40\x63\154\x61\x73\163\x3d\x22\45\x73\x20\151\164\x65\155\163\111\156\120\x61\x72\x63\145\154\40\x71\165\141\156\164\x69\x74\171\x20\163\x6f\162\164\141\x62\154\x65\42\40\x64\x61\x74\141\55\163\x6f\162\x74\75\42\146\154\x6f\141\164\42\x20\163\x74\171\x6c\145\75\x22\144\x69\x73\x70\x6c\x61\171\72\x20\156\x6f\x6e\145\x3b\42\x3e\45\163\74\57\164\150\76", $this->id, __("\x51\x75\x61\156\164\x69\x74\171\x20\151\x6e\x20\x50\141\x72\143\145\x6c", $this->id)); if (!apply_filters($this->id . "\137\150\x61\163\103\165\x73\164\x6f\x6d\x49\164\x65\x6d\x73\x46\145\x61\164\165\162\x65", false) || $this->isLocalOrder($knBKR)) { $this->logger->debug(__FILE__, 319, "\x4e\157\x20\x63\165\163\x74\157\x6d\x73\40\x69\x74\145\155\163\x20\146\145\x61\x74\165\x72\145\40\157\x72\x20\151\164\40\x69\163\40\141\x20\x6c\x6f\x63\x61\154\40\x6f\x72\144\145\162\x2c\40\x73\157\40\163\153\151\x70\40\x6f\164\150\145\162\40\143\157\x6c\x75\155\x6e\x73"); return; } echo sprintf("\x3c\164\x68\x20\143\154\141\x73\x73\x3d\x22\x25\x73\40\151\x74\145\x6d\163\111\x6e\x50\x61\x72\143\x65\x6c\40\143\x6f\165\x6e\164\x72\171\x20\x73\x6f\x72\164\141\142\154\145\x22\40\144\x61\164\x61\55\163\x6f\x72\x74\x3d\x22\x73\164\x72\151\x6e\x67\x2d\151\x6e\x73\42\40\x73\x74\171\x6c\x65\75\42\144\x69\163\x70\154\141\171\72\40\x6e\157\x6e\145\73\42\76\x25\x73\x3c\x2f\x74\x68\x3e", $this->id, __("\x43\x6f\165\x6e\x74\x72\171\40\x6f\146\x20\117\162\x69\147\x69\156", $this->id)); if (apply_filters($this->id . "\137\x68\x61\x73\x54\x61\x72\x69\x66\x66\x46\145\141\x74\165\x72\145", false)) { echo sprintf("\x3c\x74\150\x20\143\x6c\141\x73\x73\75\42\x25\163\x20\x69\164\x65\x6d\163\x49\x6e\x50\141\162\x63\x65\154\40\x63\157\x75\x6e\x74\162\x79\40\163\x6f\x72\164\141\142\x6c\x65\x22\40\144\141\164\141\55\x73\x6f\162\164\x3d\42\163\164\162\x69\156\x67\x2d\x69\x6e\x73\x22\x20\x73\164\x79\x6c\x65\x3d\x22\144\151\163\160\154\141\171\72\40\156\157\x6e\145\73\x22\76\x3c\141\40\x68\x72\145\x66\x3d\x22\x68\x74\x74\x70\x73\72\x2f\x2f\150\164\163\x2e\x75\163\151\164\x63\x2e\x67\x6f\x76\x2f\42\40\x74\x61\162\147\x65\x74\x3d\x22\x5f\x62\x6c\x61\x6e\x6b\x22\x3e\x25\163\x3c\57\141\x3e\74\57\164\150\x3e", $this->id, __("\124\141\x72\151\146\146\40\43", $this->id)); } } public function onOrderItemValues($Xa_kO, $JOnWX, $OTGUp) : void { $knBKR = $this->getCurrentOrder(); if (!is_object($knBKR) || empty($Xa_kO) || !is_a($JOnWX, "\127\103\137\117\162\x64\145\162\x5f\x49\164\145\155\x5f\x50\162\157\x64\165\143\x74") || !$this->canCreateShipment($knBKR)) { return; } $s71IQ = $JOnWX->get_quantity(); $s52qy = $JOnWX->get_total(); $this->logger->debug(__FILE__, 357, "\157\156\117\x72\x64\145\162\111\x74\x65\x6d\126\141\154\x75\x65\163\x2c\40\x70\x72\x6f\x64\x75\x63\x74\x49\144\x3a\x20\45\x64\54\x20\156\x61\155\x65\x3a\x20\45\x73\x2c\x20\x71\165\x61\156\164\x69\164\x79\72\x20\x25\x64\54\40\x70\x72\151\143\x65\72\40\x25\163", $Xa_kO->get_id(), $Xa_kO->get_name(), $s71IQ, $s52qy); if ($s71IQ > 0) { $s52qy /= $s71IQ; } echo sprintf("\x3c\x74\x64\40\143\x6c\141\x73\163\75\42\45\163\40\151\164\x65\155\163\111\x6e\x50\x61\162\x63\x65\x6c\40\x76\x61\x6c\x75\x65\42\40\x73\x74\x79\x6c\x65\x3d\x22\144\x69\x73\160\x6c\x61\171\x3a\x20\156\157\x6e\x65\73\x22\76\74\151\156\160\165\x74\40\164\x79\x70\x65\x3d\x22\x68\x69\x64\144\145\156\42\x20\156\x61\x6d\x65\75\x22\45\x73\137\160\141\x63\153\141\147\x65\133\151\164\145\x6d\x73\x5d\133\x25\144\x5d\133\x69\144\135\x22\40\166\x61\x6c\x75\x65\75\42\45\x64\42\57\x3e\74\x69\x6e\160\165\x74\x20\x74\x79\160\145\x3d\x22\156\x75\x6d\x62\x65\162\42\40\x64\141\164\x61\x2d\x69\x74\145\155\55\x69\x64\75\x22\x25\x64\42\x20\156\141\155\145\x3d\x22\x25\x73\137\x70\x61\143\x6b\x61\147\x65\x5b\x69\x74\145\155\x73\135\x5b\x25\x64\135\x5b\x76\141\x6c\x75\x65\x5d\x22\40\163\164\x65\x70\x3d\x22\x30\56\x30\x31\42\x20\x6d\x69\156\x3d\42\x30\42\x20\x76\x61\x6c\x75\x65\x3d\42\x25\x2e\62\146\x22\x2f\x3e\x3c\x2f\x74\x64\76", $this->id, $this->id, $Xa_kO->get_id(), $Xa_kO->get_id(), $Xa_kO->get_id(), $this->id, $Xa_kO->get_id(), $s52qy); echo sprintf("\x3c\164\144\x20\x63\154\141\x73\x73\x3d\42\x25\x73\40\x69\164\145\x6d\163\111\156\120\141\x72\143\x65\154\x20\x71\x75\x61\156\x74\x69\x74\171\x22\x20\x73\x74\171\x6c\145\75\x22\x64\x69\163\x70\154\141\x79\72\x20\x6e\157\x6e\x65\73\42\x3e\74\x69\156\160\165\x74\40\x74\x79\x70\x65\x3d\x22\156\165\x6d\x62\145\162\x22\40\x64\141\x74\x61\x2d\x69\164\145\155\x2d\151\x64\x3d\42\x25\144\x22\x20\156\141\155\x65\x3d\42\45\163\137\x70\x61\143\x6b\x61\x67\145\133\151\164\145\x6d\163\135\133\45\144\135\133\x71\x75\141\156\x74\x69\x74\x79\x5d\x22\40\x73\x74\x65\160\x3d\x22\x31\x22\40\x6d\151\156\x3d\42\60\42\40\x76\x61\154\165\145\x3d\x22\45\144\42\x2f\x3e\x3c\x2f\164\x64\76", $this->id, $Xa_kO->get_id(), $this->id, $Xa_kO->get_id(), $s71IQ); if (!apply_filters($this->id . "\x5f\150\141\163\x43\x75\x73\x74\157\155\111\164\145\x6d\163\x46\x65\x61\164\165\162\145", false) || $this->isLocalOrder($knBKR)) { return; } $d0n9e = (new LazyClassProxy("\x57\x43\137\103\x6f\165\156\164\x72\151\x65\163", WC()->countries))->get_countries(); $qnWWJ = $this->settings["\x64\x65\146\141\165\154\164\103\157\x75\156\x74\x72\171\x4f\x66\x4f\x72\x69\147\x69\156"]; echo sprintf("\x3c\164\144\40\143\154\141\163\x73\x3d\x22\45\163\40\151\x74\145\155\163\111\156\120\141\162\x63\145\154\40\x63\x6f\x75\x6e\x74\162\171\x22\x20\163\x74\171\154\x65\75\x22\x64\151\x73\160\154\141\x79\x3a\x20\156\157\x6e\x65\x3b\42\76\74\x73\145\x6c\145\143\x74\x20\x6e\141\155\x65\x3d\42\x25\x73\x5f\x70\x61\143\153\x61\147\x65\x5b\x69\164\x65\155\163\x5d\x5b\45\144\x5d\x5b\x6f\x72\151\x67\151\x6e\x5f\x63\x6f\165\156\164\162\x79\x5d\42\x3e", $this->id, $this->id, $Xa_kO->get_id()); foreach ($d0n9e as $gf7s7 => $GT8nC) { echo sprintf("\x3c\157\160\164\x69\157\156\40\x76\x61\154\165\145\x3d\42\x25\x73\x22\x25\163\x3e\45\163\74\x2f\x6f\x70\164\x69\x6f\156\76", $gf7s7, $gf7s7 === $qnWWJ ? "\40\x73\x65\x6c\145\x63\x74\x65\x64" : '', __($GT8nC, $this->id)); FClcP: } qUpGB: echo "\74\57\163\145\x6c\145\143\164\x3e\x3c\57\164\x64\76"; if (apply_filters($this->id . "\x5f\x68\x61\163\124\141\162\151\x66\146\106\x65\x61\164\x75\162\145", false)) { echo sprintf("\74\164\x64\40\143\154\x61\163\x73\75\x22\45\163\40\151\x74\x65\x6d\x73\111\x6e\x50\x61\162\143\145\x6c\40\x68\164\x73\x22\40\x73\x74\171\x6c\x65\75\42\x64\151\163\160\x6c\x61\171\x3a\40\x6e\157\156\x65\x3b\42\76\x3c\151\x6e\x70\165\x74\40\164\x79\x70\145\x3d\x22\x74\x65\x78\x74\42\40\x64\141\x74\x61\55\151\x74\145\x6d\x2d\x69\144\x3d\x22\x25\144\x22\x20\156\141\155\x65\75\42\x25\x73\137\x70\x61\143\x6b\x61\147\x65\133\151\164\x65\x6d\163\135\133\45\144\x5d\x5b\x74\141\x72\151\146\146\x5d\x22\40\x76\141\x6c\x75\145\x3d\42\x25\x73\42\x2f\76\x3c\57\164\x64\76", $this->id, $Xa_kO->get_id(), $this->id, $Xa_kO->get_id(), $this->settings["\x64\145\146\141\x75\154\164\124\x61\162\151\146\x66"]); } } public function onBeforeOrderItemMeta($OTGUp, $JOnWX, $Xa_kO) : void { $knBKR = $this->getCurrentOrder(); if (empty($Xa_kO) || false === is_object($knBKR) || false === is_a($JOnWX, "\x57\103\137\x4f\x72\x64\x65\162\x5f\111\x74\145\155\x5f\120\162\157\x64\165\143\x74") || false === $this->canCreateShipment($knBKR)) { return; } echo sprintf("\74\151\156\160\x75\x74\x20\164\171\x70\145\x3d\x22\x74\145\170\164\x22\x20\143\x6c\141\163\x73\x3d\x22\x25\163\x20\151\164\145\155\x73\x49\156\x50\x61\x72\x63\x65\154\40\x6e\x61\x6d\145\x22\40\144\141\x74\x61\x2d\151\164\145\155\x2d\151\x64\75\x22\45\x64\42\40\x6e\141\155\145\75\42\45\x73\x5f\x70\x61\143\x6b\141\147\x65\x5b\x69\x74\145\x6d\x73\x5d\x5b\45\144\135\x5b\x6e\x61\x6d\145\135\x22\40\166\141\154\165\x65\x3d\42\45\x73\42\x20\163\x74\171\154\145\x3d\42\144\x69\x73\x70\154\141\x79\x3a\x20\x6e\x6f\156\x65\73\x22\40\57\x3e", $this->id, $Xa_kO->get_id(), $this->id, $Xa_kO->get_id(), $Xa_kO->get_name()); } public function display(WP_Post $post) : void { $HM0Dk = $post->ID; $this->logger->debug(__FILE__, 462, "\144\151\163\x70\154\x61\x79\x3a\40{$HM0Dk}"); $knBKR = wc_get_order($HM0Dk); if (empty($knBKR)) { $this->logger->debug(__FILE__, 466, "\117\162\x64\x65\x72\40\x69\163\40\151\156\x76\x61\x6c\x69\144"); $this->notices->type = "\x65\162\162\x6f\162\40\x69\156\154\151\x6e\x65"; $this->notices->add(__("\117\x72\x64\145\162\40\151\163\40\x69\156\166\141\154\151\x64", $this->id)); $this->notices->display(); return; } $r61_O = apply_filters($this->id . "\137\147\145\x74\117\x72\144\145\162\123\x68\151\x70\155\x65\x6e\x74\x4d\x65\164\x61", [], $HM0Dk, $this->vendorId); if (empty($r61_O)) { $this->logger->debug(__FILE__, 477, "\x4f\162\x64\145\x72\40\150\x61\x73\x20\x6e\157\x20\x73\150\x69\x70\x6d\145\156\164\x73"); $this->notices->type = "\x65\162\x72\157\162\x20\151\156\154\151\x6e\x65"; $this->notices->add(__("\117\162\144\145\x72\x20\150\x61\x73\x20\156\157\40\163\150\151\x70\x6d\145\156\x74\x73", $this->id)); $this->notices->display(); return; } $this->logger->debug(__FILE__, 486, "\x43\x75\162\x72\145\156\164\40\126\x65\156\x64\x6f\162\40\111\x64\x3a\40\x25\144", $this->vendorId); $this->settings["\166\x65\x6e\x64\x6f\162\x5f\x69\144"] = $this->vendorId; $CoIJQ = []; $D5GyH = false; $bs3Qa = $this->getPackageCache($HM0Dk); if (empty($bs3Qa)) { if (false === empty($r61_O["\160\141\162\143\x65\154\x73"])) { $CoIJQ = $r61_O["\160\x61\162\143\145\154\163"]; } $CoIJQ = $this->prepareParcels($CoIJQ); $bs3Qa = current($CoIJQ); if (empty($bs3Qa["\167\x65\x69\147\x68\x74\137\x75\x6e\x69\x74"])) { $bs3Qa["\167\x65\x69\x67\x68\164\137\x75\156\x69\164"] = $this->weightUnit; } if (empty($bs3Qa["\144\151\155\145\x6e\x73\x69\157\x6e\137\165\156\151\164"])) { $bs3Qa["\x64\x69\x6d\145\156\163\x69\x6f\156\x5f\x75\156\151\164"] = $this->dimensionUnit; } $bs3Qa["\160\141\x72\x63\x65\x6c\x73"] = $CoIJQ; $bs3Qa["\x70\141\x72\x63\145\x6c\111\144\170"] = 0; if (false === empty($r61_O["\163\145\162\166\151\x63\145"])) { $bs3Qa["\163\x65\162\166\x69\x63\145"] = $r61_O["\x73\145\x72\x76\x69\143\145"]; } else { $bs3Qa["\163\145\x72\166\x69\143\145"] = ''; } if (isset($bs3Qa["\x6d\145\x64\151\141\x4d\141\x69\154"])) { $bs3Qa["\155\145\144\x69\x61\115\141\151\154"] = "\x6f\156\x6c\171" === $bs3Qa["\x6d\145\x64\x69\141\x4d\141\x69\x6c"]; } else { $bs3Qa["\155\x65\144\151\x61\x4d\141\x69\x6c"] = "\157\156\154\x79" === $this->settings["\155\x65\144\x69\x61\115\x61\151\x6c"]; } if (isset($bs3Qa["\143\157\144"])) { $bs3Qa["\x63\157\x64"] = "\x79\x65\x73" === $bs3Qa["\x63\157\x64"]; } else { $bs3Qa["\143\157\x64"] = "\171\145\163" === $this->settings["\143\x6f\x64"]; } if (isset($bs3Qa["\151\156\x73\x75\162\x61\156\143\145"])) { $bs3Qa["\151\x6e\x73\165\x72\x61\156\x63\x65"] = "\171\145\163" === $bs3Qa["\x69\x6e\163\x75\x72\x61\x6e\143\x65"]; } else { $bs3Qa["\x69\x6e\163\165\x72\x61\156\143\x65"] = "\171\x65\163" === $this->settings["\151\x6e\163\165\x72\141\156\x63\145"]; } if (isset($bs3Qa["\x73\x69\147\x6e\x61\x74\x75\x72\x65"])) { $bs3Qa["\x73\x69\x67\156\141\164\x75\x72\145"] = "\171\x65\x73" === $bs3Qa["\x73\x69\147\x6e\x61\x74\x75\162\145"]; } else { $bs3Qa["\x73\151\x67\156\141\164\165\162\x65"] = "\x79\x65\x73" === $this->settings["\163\151\147\156\141\x74\x75\x72\x65"]; } } else { $D5GyH = true; } if (false === empty($this->settings["\x64\x65\x66\141\x75\x6c\x74\123\x68\151\x70\155\x65\156\164\104\x65\163\143\x72\151\x70\164\x69\157\156"])) { $bs3Qa["\x64\145\x73\x63\162\151\160\x74\x69\x6f\156"] = $this->settings["\x64\145\x66\x61\x75\154\x74\123\150\151\x70\x6d\145\156\x74\104\x65\x73\143\x72\151\x70\164\x69\x6f\156"]; } $WUB0W = $this->getServices(); $EvwTZ = false; if ("\156\x6f" === $this->settings["\x72\145\161\x75\151\x72\145\124\157\x46\x65\164\143\x68\123\x68\x69\x70\160\x69\x6e\x67\122\141\x74\145\x73"]) { if (empty($bs3Qa["\x73\x65\x72\x76\151\143\x65\163"]) && false === empty($bs3Qa["\x73\x65\x72\166\x69\143\145"]) && false === empty($WUB0W[$bs3Qa["\163\x65\162\x76\151\x63\x65"]])) { $bs3Qa["\x73\145\x72\x76\151\143\145\163"] = [$bs3Qa["\x73\x65\162\166\x69\x63\145"] => apply_filters($this->id . "\137\x73\145\x72\x76\x69\143\x65\x5f\156\141\155\145", $WUB0W[$bs3Qa["\x73\145\162\x76\x69\143\145"]], $bs3Qa["\x73\x65\162\x76\151\143\145"])]; $EvwTZ = true; } } $this->logger->debug(__FILE__, 564, "\120\x61\143\x6b\141\x67\x65\x3a\40\x25\163", print_r($bs3Qa, true)); $SIdhZ = apply_filters($this->id . "\137\x67\x65\x74\x4f\x72\144\145\x72\x53\x68\151\x70\x6d\145\156\164\x73", [], $HM0Dk, '', $this->vendorId); $D5GyH = $D5GyH && $this->canDisplayAddShipmentForm($SIdhZ); foreach ($SIdhZ as $J7zSn) { $this->displayShipmentDetails($J7zSn, $D5GyH === false); Rla3T: } mXknu: $WSttQ = $this->isLocalOrder($knBKR); if ($this->canDisplayAddShipmentForm($SIdhZ)) { $this->logger->debug(__FILE__, 578, "\x4d\x75\x6c\164\x69\160\154\x65\x20\163\x68\x69\x70\155\145\x6e\164\x73\40\141\x72\145\40\141\154\x6c\x6f\x77\145\x64\40\x6f\x72\40\167\x65\40\x68\141\x76\145\40\156\x6f\40\x73\x68\x69\x70\x6d\x65\x6e\164\x73\40\x79\x65\164"); $this->displayActionButtons($D5GyH); $this->displayLinkShipmentForm(); $this->displayAddShipmentForm($bs3Qa, $WSttQ, $EvwTZ, $D5GyH); } $z46WW = wp_create_nonce($this->id . "\x5f\163\145\164\x74\x69\x6e\x67\x73\113\x65\x79"); $this->logger->debug(__FILE__, 587, "\x53\164\157\x72\x65\x20\163\145\164\x74\x69\x6e\147\x73\40\164\157\x20\x74\150\145\40\x63\x61\x63\x68\145\x3a\40\45\163", print_r($this->settings, true)); $this->cache->set($z46WW, $this->settings, self::CACHE_EXPIRATION_IN_SECONDS); $QiMfo = ["\151\x64" => $this->id, "\155\145\164\141\102\157\170\103\x6f\156\164\x65\156\x74\x73\111\x64" => $this->id . "\137\x6d\x65\x74\x61\x42\x6f\x78\137\x63\157\x6e\x74\x65\x6e\164\163", "\157\162\x64\x65\x72\x49\144" => $HM0Dk, "\x73\145\164\x74\151\x6e\147\x73\x4b\145\x79" => $z46WW, "\x61\152\141\170\x75\162\x6c" => admin_url("\141\144\155\151\156\x2d\141\152\141\170\56\x70\150\x70"), "\x61\154\x6c\157\x77\x4d\x75\154\164\x69\160\154\x65\123\x68\x69\x70\x6d\145\x6e\x74\x73" => $this->settings["\141\154\x6c\157\x77\115\165\154\x74\151\160\154\x65\123\150\151\x70\x6d\x65\156\x74\163"], "\143\157\156\x66\151\162\155\x42\165\x74\x74\157\156\124\145\x78\164" => __("\x43\x6f\x6e\146\x69\x72\x6d", $this->id), "\143\141\x6e\143\145\x6c\102\x75\164\164\x6f\x6e\124\x65\170\x74" => __("\x43\141\x6e\143\x65\x6c", $this->id), "\143\x6f\x6e\146\151\162\155\x44\x65\x6c\x65\x74\x65\124\145\x78\164" => __("\101\x72\x65\x20\171\x6f\165\40\x73\x75\x72\x65\x20\x77\141\x6e\164\x20\164\157\x20\x63\141\x6e\x63\x65\x6c\x20\164\150\x69\163\40\x73\150\151\160\x6d\145\x6e\x74\77", $this->id), "\x63\157\156\146\x69\162\x6d\x55\156\154\151\x6e\x6b\124\145\x78\x74" => __("\101\x72\x65\40\x79\x6f\165\40\163\165\162\x65\40\x77\x61\x6e\164\40\x74\x6f\40\165\156\x6c\x69\156\153\40\164\150\x69\x73\40\x73\x68\x69\x70\155\145\156\164\x3f", $this->id), "\143\157\x6e\146\151\162\x6d\122\x65\x66\165\156\x64\124\x65\x78\164" => __("\x41\162\145\40\171\x6f\x75\x20\163\x75\162\145\x20\x77\x61\156\x74\x20\x74\x6f\x20\x72\x65\161\165\145\163\164\x20\x72\x65\x66\165\156\144\x20\x66\157\x72\40\x74\150\x69\x73\x20\163\150\151\160\155\x65\x6e\164\77", $this->id), "\x63\x6f\x6e\146\151\x72\x6d\x53\150\x69\160\155\145\156\164\104\145\x74\141\x69\154\x73\124\151\164\x6c\x65" => __("\103\157\x6e\146\151\x72\155\x20\x53\150\151\160\155\x65\156\x74\x20\104\x65\x74\141\151\154\x73", $this->id), "\x63\157\156\146\x69\x72\155\x53\150\x69\160\155\145\x6e\164\x44\x65\164\x61\x69\154\163\124\145\x6d\160\154\x61\x74\145" => $this->getConfirmShipmentDetailsTemplate($WSttQ), "\162\x65\x71\165\x69\162\145\124\x6f\x46\145\164\x63\150\x53\150\x69\x70\160\x69\x6e\x67\122\141\x74\x65\163" => $this->settings["\162\145\161\x75\151\x72\145\124\x6f\106\x65\164\x63\x68\123\x68\151\x70\160\151\x6e\147\x52\x61\x74\x65\x73"], "\x72\x65\x71\x75\151\162\x65\x54\x6f\103\162\145\x61\x74\x65\x53\150\x69\x70\155\x65\156\x74" => $this->settings["\162\145\x71\x75\x69\162\145\124\x6f\103\x72\145\x61\x74\x65\123\150\151\160\155\145\x6e\x74"], "\x72\145\161\x75\x69\x72\x65\124\x6f\103\157\x6e\146\x69\162\155\123\150\x69\x70\x6d\145\156\164\x44\145\164\x61\151\x6c\163" => $this->settings["\162\145\x71\x75\151\x72\x65\124\x6f\x43\x6f\x6e\146\151\162\155\123\x68\151\160\155\x65\156\164\104\145\164\141\x69\x6c\x73"], "\x70\x61\162\143\145\154\163" => $CoIJQ]; $QiMfo = apply_filters($this->id . "\137\x70\162\x65\160\x61\162\145\x50\141\x63\x6b\141\147\145\x46\x6f\x72\117\162\x64\x65\162", $QiMfo, $HM0Dk, $this->vendorId); $this->enqueueScripts($QiMfo); } public function onCancelShipment() : void { $this->logger->debug(__FILE__, 623, "\157\x6e\103\141\156\x63\145\x6c\x53\150\x69\160\x6d\x65\x6e\164"); if (!$this->loadCachedSettings()) { exit; } $HM0Dk = $this->getRequestedOrderId(); if (empty($HM0Dk)) { return; } $dq8oo = $this->getRequestedShipmentId(); if (empty($dq8oo)) { exit; } do_action($this->id . "\137\143\x6c\x65\x61\162\105\162\x72\x6f\x72\x4d\145\x73\x73\x61\147\145\163"); $J7zSn = apply_filters($this->id . "\137\x63\141\x6e\143\x65\154\123\150\x69\x70\x6d\x65\156\164\106\x6f\162\117\x72\144\x65\x72", [], $HM0Dk, $dq8oo, $this->vendorId); $this->displayNotices(); $this->displayShipmentDetails($J7zSn); exit; } public function onUnlinkShipment() : void { $this->logger->debug(__FILE__, 654, "\157\156\x55\156\154\151\156\153\x53\x68\151\160\155\x65\156\x74"); if (!$this->loadCachedSettings()) { exit; } $HM0Dk = $this->getRequestedOrderId(); if (empty($HM0Dk)) { return; } $dq8oo = $this->getRequestedShipmentId(); if (empty($dq8oo)) { exit; } do_action($this->id . "\x5f\x75\x6e\x6c\151\x6e\x6b\123\x68\x69\160\155\145\156\x74\x46\x72\x6f\x6d\x4f\x72\x64\x65\x72", $HM0Dk, $dq8oo, $this->vendorId); exit; } public function onRefundShipment() : void { $this->logger->debug(__FILE__, 682, "\157\x6e\x52\145\x66\165\x6e\x64\x53\150\151\x70\x6d\145\x6e\164"); if (!$this->loadCachedSettings()) { exit; } $HM0Dk = $this->getRequestedOrderId(); if (empty($HM0Dk)) { exit; } $dq8oo = $this->getRequestedShipmentId(); if (empty($dq8oo)) { exit; } do_action($this->id . "\x5f\x63\154\x65\x61\162\x45\162\162\157\162\x4d\145\x73\163\141\x67\145\x73"); $J7zSn = apply_filters($this->id . "\137\x72\x65\146\165\156\x64\x53\x68\x69\x70\155\145\x6e\164\106\157\x72\117\x72\144\x65\x72", [], $HM0Dk, $dq8oo, $this->vendorId); $this->displayNotices(); $this->displayShipmentDetails($J7zSn); exit; } public function onCancelCreateShipment() : void { $this->logger->debug(__FILE__, 713, "\x6f\x6e\x43\141\156\x63\145\x6c\x43\x72\x65\x61\164\145\x53\150\151\x70\155\x65\x6e\164"); if (!$this->loadCachedSettings()) { exit; } $HM0Dk = $this->getRequestedOrderId(); if (empty($HM0Dk)) { exit; } $this->deletePackageCache($HM0Dk); exit; } public function onBuyShipment() : void { $this->logger->debug(__FILE__, 736, "\x6f\156\102\x75\171\123\150\151\x70\x6d\145\x6e\164"); if (!$this->loadCachedSettings()) { exit; } $HM0Dk = $this->getRequestedOrderId(); if (empty($HM0Dk)) { exit; } $J7zSn = null; $dq8oo = $this->getRequestedShipmentId(false); if (false === empty($dq8oo)) { $SIdhZ = apply_filters($this->id . "\137\147\145\164\117\x72\144\145\162\123\x68\x69\x70\155\x65\x6e\x74\163", [], $HM0Dk, $dq8oo, $this->vendorId); $J7zSn = current($SIdhZ); } else { $this->logger->debug(__FILE__, 754, "\x4e\157\x20\163\150\x69\160\x6d\145\x6e\x74\40\x49\104\54\40\163\157\x20\x75\x73\x65\x20\160\x6f\x73\x74\x65\x64\x20\160\x61\x63\x6b\x61\147\x65"); $J7zSn = $this->getRequestedPackage($HM0Dk); } $this->logger->debug(__FILE__, 758, "\123\150\151\x70\x6d\145\x6e\x74\x3a\x20\x25\163", print_r($J7zSn, true)); if (empty($J7zSn)) { exit; } do_action($this->id . "\137\143\154\x65\x61\x72\x45\x72\x72\157\x72\115\x65\x73\x73\x61\147\145\163"); $J7zSn = apply_filters($this->id . "\137\160\x75\x72\143\150\141\x73\x65\120\x6f\163\x74\x61\x67\x65\106\x6f\162\123\150\x69\x70\155\145\x6e\x74", $J7zSn, $HM0Dk, $this->vendorId); $this->displayNotices(); if (empty($J7zSn["\151\x64"])) { if (!$this->mustCreateShipment() && false === empty($dq8oo)) { do_action($this->id . "\x5f\x75\x6e\x6c\151\156\x6b\x53\x68\151\x70\x6d\x65\156\x74\x46\x72\157\155\117\162\144\x65\x72", $HM0Dk, $dq8oo, $this->vendorId); } exit; } $this->displayShipmentDetails($J7zSn); $this->deletePackageCache($HM0Dk); exit; } public function onCreateShipment() : void { $this->logger->debug(__FILE__, 788, "\x6f\x6e\103\162\145\141\164\145\x53\x68\x69\x70\155\x65\156\164"); if (!$this->loadCachedSettings()) { exit; } $HM0Dk = $this->getRequestedOrderId(); if (empty($HM0Dk)) { exit; } $J7zSn = $this->createShipment($HM0Dk); if (false === empty($J7zSn["\x69\144"])) { $this->displayShipmentDetails($J7zSn); } exit; } public function onFetchRates() : void { $this->logger->debug(__FILE__, 814, "\x6f\156\x46\145\164\x63\x68\x52\x61\164\x65\163"); if (!$this->loadCachedSettings()) { exit; } $HM0Dk = $this->getRequestedOrderId(); if (empty($HM0Dk)) { exit; } $bs3Qa = $this->getRequestedPackage($HM0Dk); if (empty($bs3Qa)) { exit; } $igqXp = $bs3Qa; if (isset($igqXp["\x73\x65\162\x76\151\x63\x65"])) { unset($igqXp["\x73\145\x72\166\151\143\145"]); } do_action($this->id . "\x5f\x63\x6c\145\141\x72\105\x72\x72\x6f\162\x4d\145\x73\163\x61\x67\x65\163"); $WUB0W = apply_filters($this->id . "\137\x67\x65\x74\123\145\162\x76\x69\x63\145\163\106\157\x72\117\x72\x64\145\162", [], $HM0Dk, $igqXp, $this->vendorId); $this->displayNotices(); if (false === empty($WUB0W)) { $bs3Qa["\x73\x65\x72\166\x69\143\145\163"] = $WUB0W; $this->setPackageCache($HM0Dk, $bs3Qa); $N1jGU = new Form($this->getServicesFields($WUB0W)); $N1jGU->display([$this->id . "\137\160\x61\x63\153\141\147\x65" => $bs3Qa]); } exit; } public function onRefreshShipment() : void { $this->logger->debug(__FILE__, 863, "\157\x6e\122\145\146\162\145\163\x68\123\150\x69\160\155\x65\x6e\x74"); if (!$this->loadCachedSettings()) { exit; } $HM0Dk = $this->getRequestedOrderId(); if (empty($HM0Dk)) { exit; } $dq8oo = $this->getRequestedShipmentId(); if (empty($dq8oo)) { exit; } do_action($this->id . "\137\143\154\145\x61\162\105\x72\162\x6f\x72\115\x65\163\163\x61\147\x65\163"); $J7zSn = apply_filters($this->id . "\x5f\x66\x65\x74\x63\x68\x53\150\x69\x70\x6d\x65\156\x74\x46\x6f\162\117\162\x64\x65\x72", [], $HM0Dk, $dq8oo, $this->vendorId); $this->displayNotices(); $this->displayShipmentDetails($J7zSn); exit; } protected function canAddMetaBox(WP_Post $post) : bool { $HM0Dk = $post->ID; $knBKR = wc_get_order($HM0Dk); return false === empty($knBKR); } private function canDisplayAddShipmentForm(array $SIdhZ) : bool { return "\x79\x65\163" === $this->settings["\x61\154\154\x6f\167\x4d\x75\154\164\x69\x70\x6c\145\x53\150\x69\x70\x6d\145\x6e\x74\x73"] || empty($SIdhZ); } private function getCurrentOrder() : ?WC_Order { global $post, $ubLBz, $O9cP0; if (!is_int($ubLBz)) { if (is_object($post) && isset($post->ID)) { $ubLBz = $post->ID; } else { $ubLBz = 0; } } if (!is_object($O9cP0)) { $O9cP0 = wc_get_order($ubLBz); if (!$O9cP0) { $O9cP0 = null; } } return $O9cP0; } private function displayNotices() : void { $FffjO = apply_filters($this->id . "\137\x67\x65\x74\105\162\162\x6f\x72\x4d\x65\x73\163\x61\x67\x65\x73", []); if (false === empty($FffjO)) { $this->notices->type = "\145\x72\x72\157\x72"; foreach ($FffjO as $fOp46) { $this->notices->add($fOp46); Cfgot: } ibglr: $this->notices->display(); } } private function isLocalOrder(WC_Order $knBKR) : bool { return apply_filters($this->id . "\x5f\x69\x73\x4c\x6f\143\141\x6c\x4f\x72\144\145\162", false, $knBKR, $this->vendorId); } private function canCreateShipment(?WC_Order $knBKR) : bool { if (!is_object($knBKR)) { return false; } $ARWuK = true; if ($ARWuK && $this->settings["\x61\154\x6c\157\x77\115\x75\x6c\x74\151\160\154\145\123\x68\x69\x70\155\145\156\x74\x73"] !== "\171\x65\x73") { $SIdhZ = apply_filters($this->id . "\x5f\147\145\164\x4f\162\x64\145\162\x53\x68\151\x70\155\x65\x6e\x74\163", [], $knBKR->get_id(), '', $this->vendorId); $ARWuK = empty($SIdhZ); } if ($ARWuK && $this->settings["\141\154\x6c\x6f\x77\103\162\x65\x61\x74\145\x53\150\x69\x70\x6d\x65\156\x74\x46\x65\x61\164\165\162\145"] !== "\x79\x65\x73") { $ARWuK = false; } $this->logger->debug(__FILE__, 996, "\x63\x61\x6e\103\162\145\x61\x74\x65\123\x68\151\x70\x6d\x65\x6e\x74\x3a\x20\45\163", $ARWuK ? "\171\x65\163" : "\x6e\157"); return $ARWuK; } private function createShipment(int $HM0Dk) : array { $this->logger->debug(__FILE__, 1009, "\x63\x72\145\141\x74\x65\x53\x68\151\160\155\x65\x6e\164"); $bs3Qa = $this->getRequestedPackage($HM0Dk); if (empty($bs3Qa)) { $this->logger->debug(__FILE__, 1013, "\x4e\157\x20\160\x61\x63\153\141\x67\x65\x20\x69\156\40\164\150\145\x20\x72\145\x71\165\145\163\164\x20\x72\x65\161\x75\x65\163\164\145\144\x2c\40\x63\141\156\40\156\x6f\164\x20\143\157\156\164\151\x6e\x75\x65"); $this->notices->add(__("\122\x65\x71\165\145\x73\164\145\x64\x20\x70\x61\x63\x6b\141\147\145\x20\x69\x73\40\x65\x6d\x70\x74\x79", $this->id)); $this->notices->display(); return []; } $WUB0W = $this->getServices(); if (empty($WUB0W)) { $this->logger->debug(__FILE__, 1022, "\114\x69\163\x74\40\157\146\x20\163\145\162\166\151\x63\x65\163\x20\151\x73\40\x65\155\x70\164\x79"); $this->notices->add(__("\x54\150\x65\162\145\40\141\x72\145\x20\156\157\40\x61\x76\x61\x69\x6c\x61\142\154\145\x20\163\x65\162\166\x69\x63\x65\163", $this->id)); $this->notices->display(); return []; } $bs3Qa["\163\145\x72\166\x69\x63\145\163"] = $WUB0W; $N1jGU = new Form($this->getServicesFields($bs3Qa["\x73\145\x72\166\151\143\145\163"])); $IhNNe = $N1jGU->filter($_POST); if (empty($IhNNe[$this->id . "\x5f\x70\x61\143\x6b\141\147\145"])) { $this->logger->debug(__FILE__, 1034, "\106\157\x72\155\x20\166\141\154\151\144\141\164\151\x6f\x6e\40\x68\141\x73\x20\x66\x61\151\154\x65\144\72\40\45\163", print_r($N1jGU->getErrors(), true)); $this->notices->add(implode("\12", $N1jGU->getErrors())); $this->notices->display(); return []; } $D4jet = $IhNNe[$this->id . "\137\x70\x61\x63\153\141\147\x65"]; $bs3Qa = array_merge($bs3Qa, $D4jet); if (false === empty($bs3Qa["\163\x65\162\166\x69\x63\x65\163"])) { unset($bs3Qa["\x73\145\162\x76\x69\x63\x65\163"]); } do_action($this->id . "\x5f\x63\x6c\145\x61\x72\105\x72\x72\157\162\x4d\145\163\163\141\x67\x65\x73"); $J7zSn = apply_filters($this->id . "\137\143\x72\x65\141\164\145\x53\150\x69\x70\x6d\x65\156\x74\106\x6f\162\120\141\x72\143\145\154", [], $bs3Qa, $HM0Dk, $this->vendorId); if (empty($J7zSn["\151\x64"])) { $this->displayNotices(); return []; } $this->deletePackageCache($HM0Dk); return $J7zSn; } private function mustCreateShipment() : bool { $XE209 = false; if (apply_filters($this->id . "\x5f\150\141\x73\103\x72\x65\141\x74\x65\123\x68\x69\160\x6d\145\156\x74\x46\145\x61\x74\165\x72\x65", false)) { $XE209 = "\171\145\163" === $this->settings["\162\x65\x71\165\151\x72\x65\124\x6f\x43\x72\x65\x61\164\145\123\150\151\x70\155\145\x6e\x74"]; } return $XE209; } private function mustPurchasePostage() : bool { return "\x79\145\x73" === $this->settings["\162\145\161\x75\151\162\145\x54\x6f\120\165\162\143\x68\141\x73\145\120\x6f\163\x74\x61\147\x65"]; } private function getConfirmShipmentDetailsTemplate(bool $WSttQ = false) : string { $NfDmS = "\74\150\64\x3e" . __("\x53\150\x69\x70\160\x69\x6e\147\x20\x41\144\144\x72\145\163\x73", $this->id) . "\74\57\150\64\x3e" . "\74\x74\x61\x62\x6c\x65\40\143\x6c\x61\163\x73\x3d\x22\167\x69\x64\x65\x66\x61\x74\42\76" . "\74\164\x72\76\74\x74\150\x20\163\164\171\154\145\x3d\42\167\x69\x64\x74\150\x3a\40\63\60\45\x22\76\40" . __("\x4e\141\155\x65", $this->id) . "\74\x2f\164\150\76\74\164\144\76\173\x5f\163\x68\x69\160\x70\x69\156\x67\137\x6e\141\x6d\145\175\173\137\163\150\x69\160\x70\x69\x6e\147\x5f\x66\151\162\x73\x74\137\x6e\141\x6d\x65\175\x20\x7b\137\x73\150\x69\160\x70\151\x6e\x67\x5f\154\141\163\164\137\156\x61\x6d\x65\175\74\x2f\164\x64\x3e\x3c\x2f\164\162\76" . "\74\x74\x72\x3e\74\x74\x68\x3e\x20" . __("\103\157\155\160\x61\156\x79", $this->id) . "\74\57\164\150\x3e\74\164\144\x3e\173\x5f\163\150\151\x70\160\x69\156\x67\137\143\157\x6d\160\141\156\x79\175\x3c\57\164\x64\x3e\x3c\x2f\164\162\76" . "\x3c\164\x72\x3e\x3c\x74\x68\x3e\x20" . __("\101\x64\x64\162\x65\163\163\40\61", $this->id) . "\74\57\164\x68\x3e\74\164\144\76\x7b\x5f\x73\150\151\x70\x70\151\156\147\137\141\144\x64\x72\x65\163\163\x5f\61\x7d\x3c\x2f\x74\144\76\x3c\57\x74\162\x3e" . "\74\x74\x72\x3e\x3c\x74\x68\x3e\x20" . __("\101\144\144\162\x65\163\163\40\x32", $this->id) . "\x3c\57\164\150\x3e\74\164\x64\76\x7b\137\x73\x68\x69\160\160\151\x6e\147\x5f\x61\x64\144\x72\x65\163\163\137\62\x7d\x3c\57\164\144\x3e\x3c\57\x74\x72\x3e" . "\74\164\162\76\x3c\x74\150\76\x20" . __("\x43\151\164\x79", $this->id) . "\74\x2f\x74\x68\x3e\x3c\x74\x64\76\173\x5f\x73\x68\x69\x70\x70\x69\156\147\137\x63\151\164\171\x7d\x3c\57\164\144\x3e\74\x2f\x74\x72\x3e" . "\74\x74\x72\76\74\164\150\x3e\x20" . __("\120\x6f\x73\164\x61\154\40\x43\x6f\144\x65", $this->id) . "\74\x2f\x74\x68\76\x3c\x74\x64\x3e\173\137\x73\150\151\160\160\x69\x6e\147\x5f\x70\157\x73\164\143\157\144\145\175\x3c\57\164\x64\76\74\57\164\x72\x3e" . "\74\x74\162\x3e\74\x74\150\76\40" . __("\x43\x6f\x75\156\x74\162\x79", $this->id) . "\x3c\x2f\x74\x68\x3e\x3c\164\144\76\173\137\x73\150\x69\160\x70\151\156\x67\137\143\157\x75\x6e\x74\x72\x79\x7d\x3c\x2f\x74\x64\76\x3c\x2f\164\x72\76" . "\74\164\x72\76\x3c\x74\150\76\40" . __("\123\164\141\x74\145\40\x2f\40\x43\x6f\165\156\x74\171\x20\x2f\40\x50\x72\157\x76\x69\x6e\x63\x65", $this->id) . "\74\x2f\x74\150\76\x3c\x74\x64\76\x7b\137\163\x68\x69\160\160\x69\156\147\137\163\x74\x61\164\145\175\x3c\57\x74\144\x3e\x3c\x2f\x74\x72\x3e" . "\x3c\x74\162\x3e\74\164\x68\76\40" . __("\120\x68\157\x6e\x65", $this->id) . "\74\x2f\x74\x68\x3e\x3c\x74\144\76\173\x5f\142\151\x6c\x6c\151\x6e\147\137\x70\x68\x6f\x6e\145\x7d\74\57\x74\x64\x3e\74\x2f\164\x72\x3e" . "\74\57\164\141\x62\x6c\x65\76" . "\74\150\x34\76" . __("\x50\x61\x63\x6b\x61\147\x65\40\104\x65\164\x61\x69\154\163", $this->id) . "\x3c\x2f\150\x34\76" . "\x3c\164\141\x62\x6c\x65\x20\143\154\x61\x73\163\x3d\x22\x77\151\144\x65\146\x61\164\42\x3e" . "\74\164\x72\x3e\x3c\164\150\40\x73\x74\171\154\145\x3d\42\x77\x69\144\x74\150\x3a\x20\x33\60\x25\42\x3e\x20" . __("\x53\x65\162\166\x69\143\145", $this->id) . "\x3c\x2f\x74\x68\76\74\164\x64\x3e\x7b\160\141\143\153\141\x67\x65\133\x73\x65\x72\166\151\x63\145\x5d\x7d\x3c\57\x74\144\76\x3c\x2f\x74\x72\76"; if ("\x79\145\x73" === $this->settings["\141\154\x6c\x6f\167\x52\145\x74\165\162\156\x4c\x61\142\145\154\106\145\141\x74\165\162\145"] && apply_filters($this->id . "\137\x68\141\163\122\x65\164\165\x72\156\114\141\x62\145\x6c\x46\x65\141\164\x75\x72\x65", false)) { $NfDmS .= "\x3c\x74\x72\x3e\74\164\x68\76\x20" . __("\111\163\x20\122\x65\164\165\x72\x6e\x20\x4c\x61\x62\145\154\77", $this->id) . "\74\x2f\x74\x68\x3e\74\x74\x64\76\173\x70\141\143\153\x61\147\145\133\x72\x65\164\165\x72\156\x5d\175\x3c\x2f\x74\x64\76\74\x2f\164\x72\x3e"; } if (false === empty($this->contentTypes)) { $NfDmS .= "\x3c\164\x72\x3e\74\164\x68\x3e\40" . __("\x43\157\156\164\145\x6e\164\163", $this->id) . "\x3c\57\164\150\76\x3c\164\x64\x3e\173\x70\x61\143\153\x61\147\145\x5b\143\157\x6e\164\145\156\x74\163\135\x7d\74\x2f\164\144\76\74\x2f\x74\162\x3e"; } $NfDmS .= "\74\x74\x72\x3e\x3c\x74\x68\x3e\40" . __("\104\145\x73\143\x72\151\x70\x74\x69\157\156", $this->id) . "\x3c\x2f\164\150\76\x3c\x74\x64\x3e\173\160\x61\x63\153\x61\x67\x65\133\x64\x65\163\143\162\x69\x70\x74\151\157\x6e\x5d\175\74\57\x74\x64\x3e\x3c\57\x74\162\x3e" . "\x3c\164\x72\x3e\74\164\150\x3e\x20" . __("\120\141\143\153\141\x67\x65\x20\x54\x79\x70\145", $this->id) . "\x3c\x2f\x74\150\76\74\164\x64\76\x7b\160\141\143\x6b\141\147\145\x5b\x74\171\x70\x65\135\175\x3c\x2f\x74\144\76\x3c\x2f\164\162\x3e" . "\74\x74\162\x3e\x3c\x74\150\x3e\x20" . __("\x44\x69\x6d\x65\x6e\x73\151\x6f\x6e\x73", $this->id) . "\x3c\x2f\x74\x68\x3e\x3c\x74\x64\x3e\114\40\x7b\x70\x61\143\153\x61\147\145\133\154\145\156\x67\x74\150\135\175\40\170\x20\x57\40\173\160\141\143\x6b\141\x67\145\x5b\x77\x69\144\164\x68\x5d\175\40\170\x20\x48\x20\x7b\x70\x61\143\x6b\141\x67\x65\133\x68\x65\151\147\x68\164\135\x7d\x20" . $this->dimensionUnit . "\74\x2f\x74\144\x3e\74\x2f\164\162\x3e" . "\x3c\164\162\x3e\74\164\x68\x3e\x20" . __("\127\145\151\147\x68\164", $this->id) . "\74\57\164\150\76\74\164\x64\x3e\173\160\141\x63\x6b\141\147\145\133\x77\145\151\147\150\x74\135\175\40" . $this->weightUnit . "\x3c\x2f\x74\144\76\74\57\x74\162\76" . "\x3c\x74\162\x3e\74\x74\150\x3e\40" . __("\126\141\x6c\165\145", $this->id) . "\74\57\164\x68\x3e\x3c\x74\144\76\173\160\x61\x63\x6b\141\147\x65\133\x63\165\x72\x72\x65\x6e\x63\171\135\x7d\40\x7b\x70\x61\x63\153\x61\x67\x65\133\x76\x61\x6c\165\145\x5d\x7d\x3c\x2f\164\x64\76\x3c\57\164\162\76" . "\74\x2f\164\x61\142\154\145\x3e"; return $NfDmS; } private function loadCachedSettings() : bool { $this->logger->debug(__FILE__, 1141, "\154\x6f\141\x64\103\x61\x63\150\x65\144\123\145\x74\164\x69\156\147\x73"); $Gm1ya = false; if (!isset($_POST["\x73\x65\x74\x74\151\156\x67\x73\113\145\171"]) || !wp_verify_nonce($_POST["\163\145\164\164\x69\x6e\x67\163\113\x65\171"], $this->id . "\137\163\145\x74\164\x69\x6e\x67\x73")) { $z46WW = $_POST["\x73\145\164\x74\151\156\x67\x73\x4b\145\x79"]; $this->cache->setUseCache(true); $QiMfo = $this->cache->get($z46WW); $this->cache->setUseCache("\171\145\x73" === $this->settings["\143\x61\x63\150\145"]); if (false === empty($QiMfo)) { $this->logger->debug(__FILE__, 1153, "\x4c\x6f\x61\x64\145\144\x20\143\141\x63\150\x65\144\x20\x73\x65\164\164\x69\156\x67\x73\x3a\x20\45\x73", print_r($QiMfo, true)); do_action($this->id . "\137\x73\x65\x74\x53\145\164\x74\x69\156\147\x73", $QiMfo); $Gm1ya = true; } } if (!$Gm1ya) { $this->logger->debug(__FILE__, 1161, "\x43\x61\143\x68\x65\40\x69\x73\x20\141\x6c\x72\145\141\144\171\40\147\x6f\x6e\x65"); $this->notices->add(__("\123\x65\x73\x73\x69\157\x6e\40\x68\x61\x73\x20\x65\x78\x70\151\x72\x65\144\54\40\160\154\145\x61\163\145\40\x72\145\146\x72\145\x73\x68\40\x74\150\x65\x20\x70\141\x67\145", $this->id)); $this->notices->display(); } return $Gm1ya; } private function getRequestedOrderId() : int { if (!isset($_POST[$this->id . "\x5f\156\157\156\x63\145"]) || !wp_verify_nonce($_POST[$this->id . "\x5f\156\157\x6e\143\x65"], $this->id)) { $this->logger->debug(__FILE__, 1177, "\x55\x6e\x61\142\154\x65\40\x74\157\40\166\x65\x72\x69\146\x79\40\x72\145\161\x75\145\163\164"); $this->notices->add(__("\x55\x6e\x61\x62\154\x65\x20\x74\x6f\x20\166\x65\162\x69\x66\171\40\x72\x65\x71\x75\x65\x73\x74", $this->id)); $this->notices->display(); return 0; } if (!isset($_POST["\x6f\x72\144\145\x72\111\x64"]) || !is_numeric($_POST["\157\162\144\145\162\111\144"])) { $this->logger->debug(__FILE__, 1185, "\x4f\162\x64\x65\x72\40\x49\x44\x20\151\x73\40\151\156\x76\141\154\x69\144"); $this->notices->add(__("\x4f\x72\144\145\x72\x20\x49\x44\40\151\x73\x20\x69\156\166\x61\x6c\151\144", $this->id)); $this->notices->display(); return 0; } $HM0Dk = intval($_POST["\157\162\x64\x65\162\x49\x64"]); $this->logger->debug(__FILE__, 1193, "\117\162\144\x65\x72\x20\x49\x44\x3a\x20" . $HM0Dk); return $HM0Dk; } private function getRequestedShipmentId(bool $T_4K2 = true) : string { if (!isset($_POST["\163\150\151\x70\x6d\x65\x6e\164\x49\144"])) { $this->logger->debug(__FILE__, 1207, "\x53\150\x69\160\x6d\145\156\164\40\111\104\40\151\x73\x20\151\156\x76\141\x6c\x69\x64"); if ($T_4K2) { $this->notices->add(__("\x53\x68\151\160\155\x65\x6e\x74\40\x49\104\40\151\163\40\x69\156\166\x61\154\151\144", $this->id)); $this->notices->display(); } return ''; } $dq8oo = $_POST["\163\x68\x69\160\155\145\156\164\111\x64"]; $this->logger->debug(__FILE__, 1218, "\x53\x68\x69\160\x6d\145\156\x74\40\x49\104\x3a\x20" . $dq8oo); return $dq8oo; } private function getRequestedPackage(int $HM0Dk) : array { $this->logger->debug(__FILE__, 1231, "\x67\x65\164\x52\x65\x71\x75\145\x73\164\x65\144\x50\141\143\x6b\141\147\145\72\40" . $HM0Dk); $WSttQ = false; $knBKR = wc_get_order($HM0Dk); if (is_object($knBKR)) { $WSttQ = $this->isLocalOrder($knBKR); } $t5RZR = $this->getServicesFields($this->getServices()); $t5RZR += $this->getAddShipmentFields($WSttQ); $N1jGU = new Form($t5RZR); $IhNNe = $N1jGU->filter($_POST); if (empty($IhNNe[$this->id . "\x5f\x70\141\x63\x6b\141\147\x65"])) { $this->logger->debug(__FILE__, 1245, "\x46\157\x72\x6d\40\x76\141\x6c\151\x64\x61\x74\151\157\x6e\40\145\x72\x72\x6f\162\163\x3a\40\45\x73", print_r($N1jGU->getErrors(), true)); $KnHYQ = $N1jGU->getErrors(); foreach ($KnHYQ as $pYRug) { $this->notices->add($pYRug); Kq5xE: } PKCw7: $this->notices->display(); return []; } $bs3Qa = $IhNNe[$this->id . "\137\x70\141\143\x6b\141\x67\145"]; $this->logger->debug(__FILE__, 1257, "\123\x75\x62\155\151\164\164\145\144\x20\120\141\143\x6b\x61\x67\x65\x3a\40\x25\x73", print_r($bs3Qa, true)); $r61_O = apply_filters($this->id . "\137\147\145\x74\117\162\144\x65\162\x53\x68\x69\x70\x6d\145\156\x74\x4d\145\x74\141", [], $HM0Dk, $this->vendorId); if (empty($bs3Qa["\163\145\162\166\151\143\x65"])) { $this->logger->debug(__FILE__, 1262, "\x53\x65\162\166\x69\x63\x65\40\x69\163\x20\156\x6f\x74\x20\163\x65\164\54\40\x73\x6f\x20\165\163\x65\40\x64\x65\x66\x61\165\x6c\x74\40\x76\x61\x6c\165\x65"); if (false === empty($r61_O["\163\x65\162\x76\x69\143\x65"])) { $bs3Qa["\x73\x65\x72\166\151\x63\x65"] = $r61_O["\x73\145\x72\166\x69\143\145"]; $this->logger->debug(__FILE__, 1267, "\x55\163\x65\40\163\145\x72\166\151\143\145\40\146\x72\157\x6d\x20\155\x65\164\141\72\x20" . $bs3Qa["\163\x65\162\x76\151\143\145"]); } } $pq7YK = $this->getRequestedItemsInParcel(); if (false === empty($pq7YK)) { $bs3Qa["\151\x74\x65\155\x73"] = $pq7YK; } else { $this->logger->debug(__FILE__, 1275, "\x49\x74\145\155\163\40\167\x65\162\145\40\156\157\x74\x20\160\157\163\x74\x65\x64"); $CoIJQ = []; if (false === empty($r61_O["\160\x61\x72\x63\x65\x6c\x73"])) { $CoIJQ = $r61_O["\x70\141\162\143\145\154\x73"]; } $ITdW6 = 0; if (isset($bs3Qa["\160\141\162\143\145\x6c\111\x64\170"])) { $ITdW6 = $bs3Qa["\x70\x61\162\x63\x65\x6c\111\x64\170"]; } if (false === empty($CoIJQ[$ITdW6]["\151\x74\x65\155\163"])) { $bs3Qa["\x69\x74\145\155\163"] = $CoIJQ[$ITdW6]["\x69\164\x65\155\x73"]; } else { $bs3Qa["\151\164\x65\155\x73"] = []; } } $bs3Qa = apply_filters($this->id . "\x5f\160\162\145\x70\141\162\145\x50\141\x63\153\141\147\x65\106\157\162\x4f\x72\x64\x65\x72", $bs3Qa, $HM0Dk, $this->vendorId); if (empty($bs3Qa["\144\145\163\164\x69\156\141\164\x69\157\156"])) { $this->notices->add(__("\x50\162\145\x70\141\162\x65\x20\150\141\x73\40\156\157\40\144\145\163\x74\x69\156\141\x74\x69\157\156", $this->id)); $this->notices->display(); return []; } if (apply_filters($this->id . "\137\150\141\163\x4f\x72\x69\147\x69\156\106\x65\x61\x74\x75\x72\145", false) && empty($bs3Qa["\157\162\x69\147\151\x6e"])) { $this->notices->add(__("\120\x61\x63\153\x61\147\145\x20\150\141\x73\40\x6e\157\40\157\x72\x69\147\x69\x6e", $this->id)); $this->notices->display(); return []; } $this->logger->debug(__FILE__, 1309, "\x50\x61\143\x6b\x61\147\x65\72\x20\45\x73", print_r($bs3Qa, true)); return $bs3Qa; } private function getPackageCacheKey(int $HM0Dk) : string { return $this->id . "\x5f\x70\141\143\153\141\147\145\x5f" . $HM0Dk . "\137" . $this->vendorId; } private function getRequestedItemsInParcel() : array { if (empty($_POST[$this->id . "\137\x70\141\x63\x6b\x61\147\x65"]["\151\x74\145\155\163"]) || !is_array($_POST[$this->id . "\x5f\x70\141\143\153\141\x67\x65"]["\x69\x74\x65\x6d\x73"])) { return []; } $yOh4W = $_POST[$this->id . "\137\x70\x61\x63\153\141\147\145"]["\x69\164\145\155\163"]; $pq7YK = []; foreach ($yOh4W as $DSmzM) { if (empty($DSmzM["\x71\165\x61\156\164\151\x74\171"])) { goto qZGNy; } if (isset($DSmzM["\151\x64"])) { $Xa_kO = wc_get_product($DSmzM["\x69\x64"]); if (empty($Xa_kO)) { $DSmzM = []; } else { $DSmzM["\x6e\x61\x6d\145"] = $DSmzM["\156\141\x6d\145"] ?? $Xa_kO->get_name(); $DSmzM["\x77\x65\151\x67\150\x74"] = $DSmzM["\x77\145\151\147\x68\x74"] ?? $Xa_kO->get_weight(); $DSmzM["\x6c\145\x6e\147\164\150"] = $DSmzM["\154\145\x6e\x67\164\x68"] ?? $Xa_kO->get_length(); $DSmzM["\x77\151\x64\164\150"] = $DSmzM["\167\x69\144\x74\150"] ?? $Xa_kO->get_width(); $DSmzM["\x68\x65\151\147\150\164"] = $DSmzM["\x68\145\151\147\x68\x74"] ?? $Xa_kO->get_height(); } } if (isset($DSmzM["\x69\144"]) && isset($DSmzM["\x71\x75\141\x6e\x74\x69\x74\x79"]) && isset($DSmzM["\x76\x61\x6c\165\145"]) && wc_get_product($DSmzM["\151\144"])) { $pq7YK[$DSmzM["\x69\x64"]] = $DSmzM; } else { $this->notices->add(sprintf(__("\x49\156\166\141\x6c\151\144\x20\151\x74\x65\155\40\x68\x61\x76\x65\40\x62\x65\145\x6e\x20\160\162\157\x76\151\x64\x65\144\x3a\40\45\x73", $this->id), print_r($DSmzM, true))); $this->notices->display(); return []; } qZGNy: } dwCYB: return $pq7YK; } private function getLinkShipmentFields() : array { $j3DSi = ["\x73\x68\x69\x70\x6d\145\156\164\137\151\144" => ["\151\x64" => $this->id . "\137\x73\150\151\x70\155\x65\x6e\164\x5f\151\144", "\164\x69\164\x6c\x65" => __("\x53\x68\151\160\x6d\x65\x6e\164", $this->id), "\x64\145\163\x63\x5f\164\x69\160" => __("\127\150\141\x74\x20\x53\150\151\x70\155\145\x6e\x74\x20\x77\157\165\x6c\x64\x20\x6c\151\153\x65\40\x74\157\40\x6c\x69\x6e\x6b\77", $this->id), "\164\171\160\x65" => "\x74\x65\x78\x74", "\x70\154\141\143\x65\x68\157\154\144\x65\x72" => __("\x65\147\56\x20\x55\x37\104\x35\131\x35\x41\64\101\67", $this->id)]]; return $j3DSi; } private function getServicesFields(array $WUB0W) : array { $j3DSi = ["\163\x65\x72\166\x69\x63\145" => ["\151\x64" => $this->id . "\x5f\160\141\143\153\x61\x67\145\x5b\163\145\x72\166\151\143\x65\135", "\164\x69\x74\x6c\145" => __("\x53\145\x72\166\151\x63\145", $this->id), "\144\x65\163\143\x5f\x74\151\x70" => __("\x57\150\x61\x74\x20\x73\x65\162\x76\151\143\145\x20\x73\150\x6f\x75\154\x64\40\142\x65\x20\165\163\x65\144\40\146\157\x72\x20\164\150\x69\x73\x20\x70\x61\x63\x6b\x61\x67\x65\77", $this->id), "\164\171\160\145" => "\x73\x65\154\x65\x63\164", "\x6f\160\164\151\x6f\x6e\163" => $WUB0W]]; return $j3DSi; } private function getAddShipmentFields(bool $WSttQ = false, array $T9XHH = []) : array { $j3DSi = []; if (false === empty($this->contentTypes)) { $j3DSi += ["\143\157\156\x74\x65\x6e\164\163" => ["\151\x64" => $this->id . "\137\x70\x61\143\153\141\147\x65\x5b\143\157\x6e\x74\x65\156\164\x73\135", "\164\x69\164\154\145" => __("\x43\x6f\x6e\164\145\x6e\x74\163", $this->id), "\144\145\163\143\x5f\x74\151\160" => __("\103\157\156\164\x65\x6e\164\x73\x20\x6f\x66\40\x74\150\145\x20\x70\x61\143\153\x61\x67\145", $this->id), "\164\171\x70\145" => "\x73\x65\154\x65\x63\x74", "\157\160\x74\x69\x6f\156\x73" => $this->contentTypes, "\144\145\x66\x61\165\154\164" => $this->settings["\144\x65\x66\x61\165\154\x74\x43\x6f\x6e\x74\x65\156\x74\163"]]]; } $j3DSi += ["\144\145\163\x63\162\x69\x70\164\151\x6f\x6e" => ["\151\144" => $this->id . "\x5f\160\x61\x63\153\141\147\x65\x5b\x64\145\163\x63\162\x69\x70\x74\151\157\156\x5d", "\164\x69\164\x6c\145" => __("\x44\145\163\x63\162\151\160\164\151\x6f\156", $this->id), "\x70\x6c\x61\143\x65\150\x6f\x6c\x64\x65\x72" => __("\104\145\x73\x63\162\151\160\164\x69\157\156\x20\x66\x6f\162\40\103\x75\x73\164\157\x6d\x73", $this->id), "\x74\171\160\145" => "\164\x65\x78\x74", "\144\x65\163\x63\137\164\x69\160" => __("\104\x65\163\x63\x72\151\160\164\151\x6f\x6e\40\x6f\146\x20\164\x68\145\40\163\x68\151\x70\155\145\156\x74\x20\x63\157\156\164\x65\x6e\164\x73", $this->id), "\163\x61\x6e\x69\164\151\x7a\x65\137\146\165\156\143\x74\151\157\156" => "\163\141\156\151\164\x69\x7a\x65\x5f\x74\x65\x78\164\x5f\x66\x69\x65\x6c\144", "\x6f\160\x74\151\x6f\156\141\x6c" => true]]; if (false === empty($T9XHH)) { $j3DSi += ["\x70\x61\162\x63\x65\x6c\111\144\170" => ["\x69\x64" => $this->id . "\x5f\160\x61\x63\153\x61\147\145\133\160\141\x72\x63\x65\154\x49\144\x78\x5d", "\x74\151\x74\x6c\x65" => __("\x50\x61\x72\x63\145\x6c\x20\x50\x72\145\163\x65\164\x73", $this->id), "\144\x65\x73\143\137\164\x69\160" => __("\123\145\154\145\143\164\x20\x6f\x6e\x65\40\x6f\x66\x20\164\x68\x65\x20\x70\x61\x72\143\x65\154\163\x20\164\x68\141\x74\x20\x70\x6c\x75\x67\x69\x6e\x20\x68\141\x73\40\x75\163\x65\144\40\146\157\x72\40\x70\141\143\153\151\156\147\40\164\150\151\163\40\x6f\162\144\145\162", $this->id), "\x74\x79\160\x65" => "\163\x65\x6c\x65\143\164", "\x6f\x70\164\x69\x6f\156\x73" => $T9XHH]]; } $ajCe5 = apply_filters($this->id . "\x5f\147\145\164\120\x61\143\x6b\141\147\x65\124\x79\160\x65\163", []); if (false === empty($ajCe5)) { $j3DSi += ["\164\x79\x70\x65" => ["\151\144" => $this->id . "\x5f\x70\x61\143\x6b\x61\147\x65\x5b\x74\171\x70\x65\x5d", "\x74\x69\x74\x6c\x65" => __("\120\x61\x63\x6b\x61\x67\145\x20\124\x79\x70\145", $this->id), "\144\x65\x73\143\137\x74\x69\160" => __("\x54\x79\160\145\x20\x6f\146\x20\x74\x68\145\40\x70\141\143\153\141\147\x65", $this->id), "\x74\x79\160\x65" => "\x73\x65\154\x65\x63\x74", "\x6f\x70\x74\151\x6f\156\163" => $ajCe5]]; } $j3DSi += ["\x6c\x65\x6e\147\164\150" => ["\151\144" => $this->id . "\137\160\141\143\x6b\x61\x67\145\133\x6c\145\156\147\164\x68\135", "\164\x69\164\154\145" => __("\x4c\x65\156\x67\x74\150", $this->id), "\x70\154\x61\143\145\150\x6f\x6c\144\145\162" => __("\114\x65\x6e\147\164\x68", $this->id), "\x74\x79\x70\x65" => "\156\165\x6d\x62\145\x72", "\143\165\x73\x74\x6f\155\137\x61\x74\164\x72\x69\x62\x75\164\145\163" => ["\x73\164\145\160" => "\x30\x2e\x30\x31"], "\x66\x69\154\x74\145\x72" => FILTER_VALIDATE_FLOAT, "\144\145\x73\x63\x5f\x74\x69\160" => __("\114\x65\156\147\164\150\40\157\146\40\x74\150\145\40\x70\141\143\x6b\141\147\x65", $this->id), "\x73\x75\x66\146\151\170" => $this->dimensionUnit], "\x77\151\144\x74\150" => ["\151\144" => $this->id . "\137\160\x61\143\153\x61\x67\145\x5b\167\151\x64\x74\x68\135", "\164\151\164\154\x65" => __("\127\151\144\164\x68", $this->id), "\x70\x6c\141\143\x65\150\157\154\x64\x65\x72" => __("\127\151\x64\x74\x68", $this->id), "\164\171\160\145" => "\x6e\165\x6d\142\145\162", "\x63\165\163\x74\x6f\155\x5f\x61\164\164\x72\x69\x62\165\164\x65\163" => ["\x73\x74\145\160" => "\x30\56\60\x31"], "\146\x69\154\164\145\x72" => FILTER_VALIDATE_FLOAT, "\144\x65\x73\x63\x5f\164\x69\x70" => __("\127\151\x64\164\150\40\x6f\x66\x20\164\x68\x65\x20\160\x61\143\153\x61\147\x65", $this->id), "\163\x75\146\146\x69\170" => $this->dimensionUnit], "\150\x65\x69\x67\150\164" => ["\151\144" => $this->id . "\x5f\160\x61\x63\x6b\141\x67\145\133\150\x65\x69\x67\150\x74\135", "\164\151\x74\154\145" => __("\110\x65\151\147\x68\164", $this->id), "\x70\154\141\x63\145\x68\x6f\154\x64\x65\x72" => __("\110\x65\x69\x67\150\x74", $this->id), "\164\x79\x70\145" => "\156\x75\x6d\x62\145\162", "\x63\165\163\x74\x6f\x6d\137\141\x74\x74\162\x69\x62\165\164\x65\x73" => ["\x73\164\145\160" => "\60\56\60\61"], "\x66\151\154\x74\x65\162" => FILTER_VALIDATE_FLOAT, "\x64\x65\163\x63\137\164\151\160" => __("\x48\145\151\x67\150\164\x20\x6f\146\40\x74\x68\x65\40\x70\x61\143\153\141\x67\x65", $this->id), "\x73\165\x66\146\x69\x78" => $this->dimensionUnit], "\x77\x65\x69\147\x68\x74" => ["\151\144" => $this->id . "\137\x70\141\x63\153\x61\147\145\133\167\145\x69\147\x68\164\x5d", "\164\x69\x74\154\x65" => __("\x57\x65\151\147\150\164", $this->id), "\160\x6c\x61\143\145\150\x6f\154\x64\x65\162" => __("\127\145\151\147\150\x74", $this->id), "\164\171\160\145" => "\x6e\x75\x6d\142\145\162", "\x63\x75\163\164\157\155\137\141\164\164\x72\x69\142\165\164\x65\x73" => ["\x73\x74\x65\160" => "\60\56\60\61"], "\x66\151\154\x74\145\x72" => FILTER_VALIDATE_FLOAT, "\x64\x65\x73\x63\137\164\151\x70" => __("\127\145\x69\x67\150\x74\x20\x6f\146\40\164\x68\x65\x20\x70\x61\x63\153\x61\x67\x65", $this->id), "\163\x75\146\x66\x69\170" => $this->weightUnit]]; if (apply_filters($this->id . "\x5f\x68\141\x73\106\x72\145\x69\147\150\164\103\154\141\163\163\106\145\141\164\165\162\x65", false)) { $j3DSi += ["\146\162\145\151\147\150\164\103\x6c\x61\163\x73" => ["\x69\144" => $this->id . "\x5f\x70\141\x63\153\x61\147\x65\x5b\146\162\x65\151\x67\150\x74\x43\154\141\x73\x73\x5d", "\x74\151\x74\154\145" => __("\x46\x72\x65\151\147\x68\164\x20\103\x6c\x61\x73\163", $this->id), "\144\145\x73\143\137\164\151\x70" => __("\105\x73\x74\151\x6d\x61\x74\x65\144\x20\x66\x72\145\151\147\150\164\40\143\x6c\x61\x73\163\x20\x6e\x75\x6d\142\145\162", $this->id), "\164\171\x70\145" => "\163\145\x6c\x65\x63\x74", "\x6f\160\x74\x69\x6f\x6e\x73" => [50 => __("\x43\x6c\141\x73\163\x20\65\60", $this->id), 55 => __("\103\x6c\x61\163\x73\x20\65\x35", $this->id), 60 => __("\x43\154\x61\163\x73\40\x36\60", $this->id), 65 => __("\x43\154\141\x73\163\40\66\65", $this->id), 70 => __("\103\154\141\x73\163\x20\67\x30", $this->id), 77.5 => __("\103\154\141\163\x73\x20\x37\x37\x2e\65", $this->id), 85 => __("\103\154\141\x73\163\40\70\x35", $this->id), 92.5 => __("\x43\x6c\141\x73\x73\x20\x39\x32\x2e\65", $this->id), 100 => __("\103\154\141\x73\x73\40\x31\x30\x30", $this->id), 110 => __("\103\154\141\x73\x73\x20\x31\x31\x30", $this->id), 125 => __("\x43\154\x61\163\163\x20\x31\x32\x35", $this->id), 150 => __("\x43\x6c\141\x73\163\x20\x31\65\x30", $this->id), 175 => __("\103\x6c\141\163\x73\x20\x31\67\x35", $this->id), 200 => __("\x43\x6c\141\x73\x73\40\62\60\x30", $this->id), 250 => __("\x43\x6c\141\163\x73\x20\x32\x35\60", $this->id), 300 => __("\103\x6c\141\x73\x73\40\x33\60\60", $this->id), 400 => __("\103\154\x61\163\163\x20\x34\x30\x30", $this->id), 500 => __("\x43\154\141\163\163\x20\x35\60\x30", $this->id)]]]; } $YLUol = apply_filters($this->id . "\137\147\145\x74\103\165\x72\x72\145\x6e\x63\x69\x65\x73", []); if (false === empty($YLUol)) { $j3DSi += ["\x63\165\162\x72\x65\x6e\143\171" => ["\151\x64" => $this->id . "\x5f\160\141\x63\x6b\141\x67\145\133\x63\165\x72\x72\x65\x6e\x63\x79\x5d", "\x74\x69\164\x6c\x65" => __("\x43\x75\x72\162\x65\156\x63\x79", $this->id), "\x64\145\163\143\137\164\151\x70" => __("\x43\x75\x72\x72\x65\x6e\143\x79\x20\157\x66\40\164\150\x65\x20\x70\141\x63\x6b\x61\x67\145\x20\166\x61\154\165\x65", $this->id), "\164\x79\x70\x65" => "\163\145\x6c\145\143\x74", "\x6f\x70\x74\x69\x6f\x6e\163" => $YLUol, "\144\x65\x66\141\x75\x6c\x74" => apply_filters($this->id . "\137\147\x65\x74\104\145\146\141\165\154\164\x43\x75\162\x72\x65\x6e\x63\x79", '')]]; } $j3DSi += ["\166\141\154\165\145" => ["\151\144" => $this->id . "\x5f\160\x61\x63\153\x61\147\x65\x5b\x76\141\154\165\145\x5d", "\x74\151\x74\x6c\x65" => __("\126\141\154\x75\x65", $this->id), "\x70\154\x61\x63\x65\150\157\x6c\x64\x65\x72" => __("\126\141\154\x75\x65", $this->id), "\164\x79\160\145" => "\156\165\155\142\145\162", "\143\x75\x73\164\x6f\155\137\x61\x74\x74\x72\x69\142\x75\x74\145\163" => ["\x73\164\x65\x70" => "\x30\x2e\x30\x31"], "\x66\x69\x6c\164\x65\x72" => FILTER_VALIDATE_FLOAT, "\x6f\x70\x74\151\x6f\156\x61\154" => true, "\x64\x65\163\x63\x5f\164\x69\160" => __("\126\x61\x6c\x75\x65\x20\157\x66\x20\x74\x68\x65\40\x70\141\143\x6b\141\147\145", $this->id)]]; $j3DSi += $this->getSignatureFields(); $j3DSi += $this->getCodFields(); if ("\171\145\x73" === $this->settings["\141\154\x6c\157\x77\x49\x6e\163\x75\162\x61\x6e\143\145\x46\145\141\164\x75\162\145"] && apply_filters($this->id . "\x5f\x68\x61\163\x49\x6e\163\165\x72\141\x6e\x63\x65\106\x65\x61\x74\165\x72\145", false)) { $j3DSi += ["\151\x6e\x73\165\162\x61\156\143\145" => ["\151\x64" => $this->id . "\x5f\x70\x61\143\153\141\x67\145\133\x69\x6e\x73\x75\x72\x61\x6e\x63\145\x5d", "\x74\151\x74\x6c\145" => __("\111\156\x63\154\x75\144\145\40\x49\x6e\163\165\x72\141\156\143\145", $this->id), "\x74\x79\160\x65" => "\x63\x68\145\143\153\x62\157\x78"]]; } if ("\x79\145\163" === $this->settings["\141\x6c\154\157\x77\x53\141\164\165\x72\x64\x61\171\x44\145\154\151\166\145\162\171\x46\x65\x61\x74\165\162\145"] && apply_filters($this->id . "\x5f\x68\141\163\x53\141\164\165\x72\144\x61\x79\x44\x65\x6c\151\166\145\162\x79\x46\145\x61\164\165\162\x65", false)) { $j3DSi += ["\x73\x61\x74\x75\x72\144\x61\171\137\x64\145\x6c\x69\x76\145\162\171" => ["\x69\144" => $this->id . "\x5f\x70\x61\x63\153\141\147\x65\133\x73\141\164\165\162\144\141\171\x5f\x64\145\x6c\x69\166\x65\162\171\x5d", "\164\151\164\x6c\x65" => __("\123\141\164\165\x64\141\x79\40\x44\x65\154\151\166\145\162\x79", $this->id), "\x74\171\x70\x65" => "\143\x68\145\143\153\142\157\170"]]; } if ("\x79\x65\163" === $this->settings["\141\x6c\x6c\157\x77\x48\x6f\154\x64\106\x6f\162\120\x69\143\153\165\160\x46\x65\141\x74\165\162\145"] && apply_filters($this->id . "\x5f\150\x61\163\x48\157\154\144\106\157\x72\120\151\143\x6b\x75\160\106\145\141\x74\x75\162\145", false)) { $j3DSi += ["\x68\157\x6c\x64\x5f\x66\157\162\x5f\x70\151\x63\x6b\x75\x70" => ["\x69\144" => $this->id . "\x5f\160\141\143\153\x61\x67\145\133\x68\157\154\x64\137\146\157\162\137\160\x69\143\x6b\165\x70\135", "\164\x69\164\154\145" => __("\x48\x6f\154\144\40\x46\x6f\x72\40\120\151\143\x6b\165\160", $this->id), "\x74\x79\160\145" => "\143\x68\145\143\153\142\x6f\x78"]]; } if ("\171\145\163" === $this->settings["\x61\154\x6c\157\167\x41\154\143\x6f\150\157\x6c\x46\x65\141\164\x75\162\x65"] && apply_filters($this->id . "\x5f\x68\x61\163\x41\154\x63\157\150\x6f\x6c\x46\x65\141\x74\x75\162\145", false)) { $j3DSi += ["\x61\154\x63\157\x68\157\x6c" => ["\151\144" => $this->id . "\x5f\x70\141\x63\x6b\141\x67\145\x5b\141\x6c\143\157\x68\x6f\154\x5d", "\x74\151\164\154\145" => __("\x41\x6c\x63\157\150\157\154", $this->id), "\164\x79\160\145" => "\143\150\145\143\153\142\157\170"]]; } if ("\x79\x65\x73" === $this->settings["\x61\x6c\x6c\x6f\167\104\x72\171\111\143\145\106\145\x61\x74\165\x72\145"] && apply_filters($this->id . "\x5f\x68\141\x73\104\162\171\x49\143\x65\x46\145\141\x74\165\162\145", false)) { $j3DSi += ["\144\x72\171\x49\x63\145" => ["\x69\x64" => $this->id . "\x5f\x70\141\143\x6b\x61\147\145\133\144\162\171\x49\143\x65\x5d", "\x74\151\x74\x6c\145" => __("\x44\162\171\x20\x49\143\x65", $this->id), "\164\x79\x70\145" => "\143\150\x65\x63\153\142\x6f\x78"]]; } if ("\x79\x65\163" === $this->settings["\141\x6c\154\x6f\x77\x4d\145\144\151\141\x4d\x61\151\x6c\x46\x65\141\x74\165\x72\x65"] && apply_filters($this->id . "\137\150\141\x73\115\145\x64\x69\x61\x4d\x61\x69\154\106\x65\x61\x74\165\162\x65", false)) { $j3DSi += ["\x6d\145\144\151\141\115\141\151\x6c" => ["\x69\144" => $this->id . "\x5f\160\141\x63\x6b\x61\147\x65\133\x6d\x65\x64\x69\x61\115\x61\x69\154\x5d", "\x74\x69\164\x6c\145" => __("\x4d\x65\144\x69\x61\40\x4d\141\x69\x6c", $this->id), "\164\x79\160\145" => "\143\150\x65\x63\x6b\142\x6f\170", "\x64\x65\146\x61\165\154\x74" => $this->settings["\x6d\x65\144\x69\x61\x4d\141\151\x6c"] === "\157\x6e\x6c\x79" ? "\x79\x65\x73" : "\156\157"]]; } if ("\171\145\163" === $this->settings["\x61\x6c\154\157\167\x52\145\x74\165\162\x6e\114\x61\142\x65\x6c\106\x65\141\x74\165\x72\x65"] && apply_filters($this->id . "\137\150\141\163\x52\145\x74\x75\162\x6e\114\x61\142\145\154\x46\145\141\164\x75\x72\x65", false)) { $j3DSi += ["\x72\145\164\x75\162\156" => ["\151\144" => $this->id . "\x5f\x70\141\x63\x6b\141\x67\x65\x5b\162\145\x74\165\x72\156\x5d", "\164\x69\164\154\x65" => __("\122\145\164\x75\x72\156\x20\x4c\141\x62\145\x6c", $this->id), "\x74\x79\x70\x65" => "\143\150\x65\x63\x6b\x62\x6f\x78", "\144\x65\146\141\165\x6c\164" => "\x6e\157"]]; } return $j3DSi; } private function getCodFields() : array { if ("\x79\x65\163" !== $this->settings["\x61\154\x6c\x6f\167\103\x6f\144\106\x65\141\164\x75\x72\x65"] || false === apply_filters($this->id . "\x5f\150\141\x73\x43\157\144\x46\145\x61\x74\x75\162\145", false)) { return []; } $j3DSi = ["\x63\157\144" => ["\x69\x64" => $this->id . "\x5f\x70\x61\x63\x6b\141\x67\145\x5b\143\x6f\x64\135", "\x74\151\164\x6c\145" => __("\x43\141\163\x68\x20\x6f\156\40\104\145\x6c\x69\166\x65\162\171", $this->id), "\164\171\160\x65" => "\143\150\145\x63\x6b\x62\x6f\170", "\x64\x65\x66\141\165\x6c\x74" => $this->settings["\143\x6f\x64"]]]; $KYCjx = apply_filters($this->id . "\x5f\x67\145\x74\x43\157\144\115\x65\x74\x68\157\x64\x73", []); if (false === empty($KYCjx)) { $j3DSi += ["\x63\157\x64\137\x6d\x65\x74\150\157\x64" => ["\x69\144" => $this->id . "\137\160\141\143\x6b\141\x67\145\x5b\143\157\x64\137\x6d\x65\x74\150\x6f\x64\x5d", "\x74\x69\164\x6c\x65" => __("\103\117\x44\x20\x4d\145\164\150\157\144", $this->id), "\x74\171\160\x65" => "\163\x65\x6c\x65\x63\x74", "\x6f\160\x74\x69\x6f\156\x73" => $KYCjx, "\144\145\x66\141\165\x6c\x74" => $this->settings["\143\x6f\144\137\x6d\145\x74\150\x6f\144"], "\x63\x6c\141\x73\163" => "\x63\157\x64\137\146\x69\145\154\x64"]]; } $j3DSi += ["\143\157\x64\x5f\141\x6d\x6f\165\156\164" => ["\x69\144" => $this->id . "\x5f\160\x61\x63\153\141\147\145\x5b\x63\157\144\x5f\x61\155\157\165\x6e\x74\x5d", "\164\x69\x74\x6c\145" => __("\103\117\x44\x20\x41\x6d\157\x75\156\164", $this->id), "\x70\x6c\x61\143\x65\150\x6f\154\144\x65\162" => __("\126\x61\154\165\145", $this->id), "\x74\x79\x70\x65" => "\x6e\x75\155\x62\145\x72", "\x63\165\163\164\157\x6d\x5f\x61\x74\x74\x72\151\142\x75\x74\145\x73" => ["\163\164\x65\160" => "\60\56\x30\x31"], "\x66\151\x6c\164\145\x72" => FILTER_VALIDATE_FLOAT, "\x6f\160\x74\x69\x6f\x6e\141\x6c" => true, "\x64\145\x73\x63\x5f\x74\x69\160" => __("\101\155\x6f\165\x6e\x74\40\x74\150\x61\x74\40\x68\x61\163\x20\164\x6f\40\x62\145\x20\143\157\x6c\154\145\143\x74\x65\x64", $this->id), "\143\154\x61\163\x73" => "\x63\157\144\x5f\146\x69\145\154\144"]]; return $j3DSi; } private function getSignatureFields() : array { if ("\x79\145\163" !== $this->settings["\x61\154\154\x6f\x77\123\x69\147\156\141\x74\165\162\x65\106\x65\141\164\x75\x72\x65"] || !apply_filters($this->id . "\x5f\150\141\163\123\x69\x67\x6e\x61\164\165\x72\x65\x46\145\141\164\165\162\145", false)) { return []; } $j3DSi = []; $vPLUx = apply_filters($this->id . "\x5f\x67\x65\164\123\x69\147\x6e\x61\x74\165\162\145\124\171\x70\x65\x73", []); if (false === empty($vPLUx)) { $j3DSi = ["\163\151\147\156\141\164\165\162\145\x5f\x74\x79\160\x65" => ["\151\x64" => $this->id . "\137\x70\x61\143\153\141\x67\145\133\163\x69\147\156\x61\164\165\162\x65\x5f\x74\171\160\x65\x5d", "\164\151\164\x6c\x65" => __("\x53\151\x67\x6e\141\x74\x75\162\145\40\124\x79\160\x65", $this->id), "\164\x79\x70\145" => "\163\x65\x6c\x65\143\x74", "\157\160\x74\x69\157\156\163" => $vPLUx]]; } else { $j3DSi = ["\163\x69\x67\156\141\164\165\162\x65" => ["\151\144" => $this->id . "\x5f\x70\x61\143\153\x61\x67\145\x5b\163\151\x67\x6e\x61\164\165\162\x65\x5d", "\x74\151\164\154\145" => __("\123\x69\x67\156\141\x74\x75\x72\x65\x20\122\x65\x71\165\x69\162\x65\x64", $this->id), "\164\x79\160\145" => "\x63\150\x65\x63\x6b\x62\x6f\x78"]]; } return $j3DSi; } private function displayAddShipmentForm(array $bs3Qa, bool $WSttQ, bool $EvwTZ, bool $HiNiO = true) : void { if ($this->settings["\x61\x6c\x6c\157\x77\103\x72\145\x61\x74\x65\123\150\x69\x70\x6d\x65\156\164\106\145\141\164\x75\x72\x65"] !== "\171\x65\163") { return; } if (empty($bs3Qa)) { $bs3Qa = []; } $bs3Qa = array_merge(["\167\x69\144\x74\x68" => '', "\150\x65\x69\x67\150\164" => '', "\154\x65\x6e\x67\164\x68" => '', "\167\x65\151\147\150\164" => ''], $bs3Qa); $T9XHH = []; if (false === empty($bs3Qa["\x70\x61\162\x63\x65\154\163"]) && is_array($bs3Qa["\x70\141\x72\143\145\154\x73"])) { $CoIJQ =& $bs3Qa["\160\x61\x72\143\145\x6c\163"]; foreach ((array) $CoIJQ as $ITdW6 => $NiaEJ) { $T9XHH[$ITdW6] = sprintf("\45\163\x20\50\x25\163\x20\170\x20\x25\x73\x20\x78\x20\x25\x73\40\x25\163\51", $NiaEJ["\x62\157\170\x4e\x61\x6d\145"], $NiaEJ["\154\145\156\147\164\x68"], $NiaEJ["\167\151\x64\x74\x68"], $NiaEJ["\x68\145\151\x67\150\164"], $this->dimensionUnit); APj9l: } PvtuK: } echo sprintf("\74\x64\151\x76\40\x63\154\141\x73\x73\75\42\141\144\144\x53\x68\151\160\x6d\x65\x6e\164\x46\157\x72\155\40\x73\150\x69\160\x6d\x65\156\x74\115\x65\164\141\x42\x6f\x78\106\x6f\x72\155\40\45\x73\x22\x20\163\x74\x79\154\145\x3d\42\x64\151\x73\x70\154\x61\171\x3a\x20\45\x73\x3b\42\x3e", $EvwTZ ? "\163\x6b\x69\160\106\x65\x74\143\150\x53\x68\151\x70\160\151\156\x67\x52\141\164\x65\163" : '', $HiNiO ? "\142\154\157\143\153" : "\156\157\x6e\145"); echo sprintf("\74\160\x3e\45\x73\74\x2f\x70\76", __("\x50\x6c\145\141\163\145\40\166\145\x72\x69\146\171\x20\154\151\x73\x74\40\157\146\40\164\x68\145\x20\151\164\145\x6d\163\54\x20\x64\x69\x6d\x65\x6e\163\151\157\x6e\x73\x20\x6f\x66\40\x74\x68\145\40\x70\x61\162\x63\x65\x6c\x2c\x20\x74\x6f\x74\x61\154\40\x77\x65\151\147\150\164\x2c\40\166\141\154\x75\x65\40\141\156\144\x20\x73\x68\151\x70\160\x69\156\x67\x20\x61\x64\x64\x72\x65\163\x73\x20\157\146\x20\x74\150\145\40\157\x72\144\145\162\40\142\145\x66\157\x72\145\40\x63\x6f\156\164\151\156\165\151\x6e\x67\56", $this->id)); echo "\74\x74\141\x62\154\x65\x20\x63\154\x61\163\x73\75\x22\146\157\162\155\x2d\164\141\x62\154\145\42\76"; if (false === empty($bs3Qa["\163\145\162\166\151\143\145\x73"]) && is_array($bs3Qa["\x73\145\162\x76\151\143\145\163"])) { $A1dyo = new Form($this->getServicesFields((array) $bs3Qa["\x73\145\162\166\x69\143\x65\x73"])); $A1dyo->display([$this->id . "\x5f\160\141\143\x6b\141\147\x65" => $bs3Qa]); } $WdpYA = new Form($this->getAddShipmentFields($WSttQ, $T9XHH)); $WdpYA->display([$this->id . "\x5f\x70\141\143\153\x61\x67\x65" => $bs3Qa]); echo "\74\57\164\x61\142\154\x65\76"; echo sprintf("\x3c\x62\165\x74\164\x6f\x6e\40\164\x79\160\145\x3d\x22\142\165\x74\164\x6f\x6e\x22\x20\x63\x6c\141\x73\x73\x3d\x22\142\165\164\164\x6f\156\40\x66\145\x74\x63\150\x53\150\151\x70\x70\151\156\147\122\141\x74\145\x73\42\40\163\164\x79\x6c\145\75\x22\144\x69\x73\x70\154\x61\171\x3a\x20\45\163\x3b\42\x3e\45\163\74\57\x62\165\164\x74\157\x6e\x3e", empty($bs3Qa["\163\x65\x72\166\x69\x63\145\163"]) ? "\x69\156\154\x69\x6e\x65\55\142\154\157\143\153" : "\x6e\157\x6e\145", __("\x47\x65\x74\x20\141\40\121\x75\x6f\164\x65", $this->id)); if ($this->mustCreateShipment()) { echo sprintf("\x3c\142\x75\164\164\157\x6e\x20\164\171\x70\145\x3d\42\142\x75\164\164\x6f\156\x22\x20\x63\154\x61\163\x73\x3d\42\x62\165\164\164\157\x6e\x20\x63\x72\x65\141\164\x65\x53\x68\x69\x70\x6d\145\156\x74\42\x20\163\164\171\x6c\x65\75\x22\144\151\x73\x70\x6c\141\x79\72\x20\x25\163\x3b\42\76\x25\163\x3c\x2f\142\x75\164\x74\x6f\x6e\x3e", false === empty($bs3Qa["\163\145\x72\166\151\x63\145\x73"]) ? "\x69\x6e\154\x69\156\x65\55\142\154\157\x63\x6b" : "\156\x6f\x6e\145", __("\x43\x72\x65\x61\164\145\40\123\x68\x69\x70\155\x65\x6e\164", $this->id)); } elseif ($this->mustPurchasePostage()) { echo sprintf("\74\x62\165\x74\164\x6f\x6e\x20\164\x79\x70\145\x3d\x22\x62\165\164\x74\x6f\156\42\x20\x63\154\141\163\x73\75\x22\142\x75\x74\x74\157\x6e\x20\x62\165\171\123\150\x69\160\x6d\145\x6e\164\x22\x20\x73\164\171\154\145\75\x22\144\x69\163\160\154\141\171\72\40\45\163\73\x22\x3e\45\163\x3c\x2f\142\x75\x74\164\x6f\156\x3e", false === empty($bs3Qa["\x73\x65\162\166\151\143\145\x73"]) ? "\x69\x6e\154\151\x6e\x65\55\x62\154\x6f\143\x6b" : "\156\x6f\156\x65", __("\102\165\x79\40\x53\150\x69\x70\x70\151\156\x67\40\x4c\x61\x62\145\x6c", $this->id)); } else { echo sprintf("\x3c\142\165\x74\x74\x6f\x6e\40\164\x79\160\x65\75\42\x62\x75\164\x74\x6f\x6e\x22\40\x63\154\x61\x73\x73\x3d\42\x62\165\x74\164\x6f\x6e\x20\142\165\x79\x53\150\151\160\x6d\x65\156\x74\40\x64\x6f\x77\156\x6c\157\x61\144\42\x20\x73\x74\x79\x6c\x65\75\x22\x64\x69\163\x70\154\141\171\72\40\x25\163\x3b\42\76\45\163\x3c\57\142\165\164\164\157\x6e\76", false === empty($bs3Qa["\x73\x65\162\x76\x69\143\145\x73"]) ? "\x69\156\x6c\151\156\145\x2d\x62\x6c\x6f\143\153" : "\x6e\x6f\x6e\x65", __("\x50\x72\151\x6e\164\40\123\x68\151\160\x70\x69\156\147\x20\114\141\x62\145\154", $this->id)); } echo sprintf("\74\142\x75\x74\164\157\156\x20\x74\171\x70\145\75\42\142\x75\164\164\157\x6e\x22\x20\143\x6c\141\x73\x73\x3d\42\142\165\x74\x74\x6f\x6e\x20\x63\141\156\x63\x65\154\103\162\145\x61\164\x65\x53\x68\151\x70\x6d\145\156\164\x22\76\x25\163\x3c\57\142\x75\164\x74\157\x6e\x3e", __("\103\x61\156\x63\x65\x6c", $this->id)); echo "\x3c\x2f\144\x69\166\x3e"; } private function displayLinkShipmentForm() : void { if ($this->settings["\x61\154\154\157\x77\x4c\151\x6e\x6b\x46\x65\141\164\165\162\145"] !== "\x79\145\x73" || !apply_filters($this->id . "\x5f\x68\141\163\114\151\156\x6b\123\150\151\x70\x6d\145\x6e\x74\x46\x65\141\164\165\x72\145", false)) { return; } echo "\74\x64\151\x76\40\x63\154\141\x73\163\x3d\x22\x6c\x69\156\153\123\150\151\x70\x6d\x65\156\164\x46\157\x72\x6d\40\x73\150\151\160\155\x65\156\164\x4d\145\164\141\x42\157\170\106\x6f\x72\155\x22\x20\163\x74\171\154\145\75\42\144\151\163\x70\154\x61\171\x3a\x20\x6e\157\156\145\x3b\x22\x3e"; echo "\74\x74\141\x62\x6c\145\40\x63\154\141\163\x73\75\42\x66\157\162\155\55\164\141\142\154\x65\42\76"; $gI4Ez = new Form($this->getLinkShipmentFields()); $gI4Ez->display(); echo "\x3c\57\164\141\142\x6c\145\76"; echo sprintf("\74\x62\165\x74\164\157\156\40\164\x79\160\145\x3d\42\142\x75\164\164\157\x6e\x22\x20\143\x6c\x61\163\x73\x3d\x22\142\165\164\x74\157\156\40\x6c\151\x6e\x6b\123\x68\x69\x70\x6d\x65\x6e\x74\x22\76\45\163\x3c\x2f\x62\x75\164\164\157\156\x3e", __("\x4c\x69\156\x6b\40\x53\x68\151\160\x6d\x65\x6e\164", $this->id)); echo sprintf("\x3c\142\x75\x74\x74\x6f\x6e\40\x74\171\160\x65\75\42\142\x75\164\x74\x6f\156\42\x20\x63\x6c\x61\x73\x73\x3d\42\x62\x75\x74\x74\x6f\156\x20\143\141\156\x63\x65\154\x43\162\145\141\x74\x65\123\x68\x69\x70\x6d\145\156\164\x22\76\45\x73\74\57\x62\x75\164\164\x6f\x6e\76", __("\x43\141\x6e\143\x65\154", $this->id)); echo "\x3c\57\144\151\x76\76"; } private function displayActionButtons(bool $HiNiO = false) : void { if ("\171\x65\x73" === $this->settings["\x61\x6c\154\x6f\x77\103\162\145\141\164\x65\123\x68\151\160\x6d\x65\156\x74\x46\x65\x61\164\x75\x72\x65"]) { echo sprintf("\x3c\x62\165\164\x74\157\156\x20\164\x79\160\145\x3d\42\x62\x75\x74\x74\157\x6e\x22\x20\x63\x6c\x61\163\163\x3d\42\142\x75\164\x74\157\x6e\40\x73\x68\x6f\167\x41\144\x64\x53\x68\151\x70\155\x65\x6e\164\x22\x20\x73\x74\171\154\145\x3d\x22\x64\151\x73\160\x6c\x61\171\x3a\40\45\x73\73\x22\76\45\163\74\x2f\x62\165\164\164\157\x6e\76\40", $HiNiO ? "\156\157\156\x65" : "\x69\156\154\x69\x6e\x65\55\x62\154\x6f\x63\x6b", __("\103\162\x65\x61\x74\x65\x20\x53\x68\x69\160\x70\x69\x6e\147\x20\114\x61\142\x65\x6c", $this->id)); } if ("\x79\x65\x73" === $this->settings["\141\x6c\154\x6f\x77\114\x69\156\x6b\106\145\x61\164\x75\162\145"] && apply_filters($this->id . "\137\150\141\163\x4c\x69\x6e\x6b\x53\x68\151\x70\x6d\x65\156\x74\x46\145\141\164\165\162\145", false)) { echo sprintf("\74\x62\x75\164\164\x6f\x6e\x20\x74\x79\x70\x65\x3d\x22\142\x75\x74\164\x6f\x6e\42\40\143\x6c\141\x73\x73\x3d\x22\x62\x75\164\x74\x6f\x6e\40\163\x68\157\x77\114\x69\156\x6b\x53\x68\x69\x70\155\145\156\x74\42\40\163\x74\x79\154\x65\x3d\42\144\151\163\160\154\141\171\x3a\40\45\163\73\x22\76\45\x73\74\57\x62\x75\x74\164\x6f\156\x3e\40", $HiNiO ? "\156\x6f\x6e\x65" : "\x69\156\154\151\156\x65\x2d\x62\154\x6f\x63\x6b", __("\x4c\151\156\x6b\40\105\x78\151\x73\x74\x69\x6e\147\40\x53\x68\151\160\x6d\x65\156\164", $this->id)); } } private function displayShipmentDetails(array $J7zSn, bool $HiNiO = true) : void { $this->logger->debug(__FILE__, 1890, "\x64\151\x73\160\x6c\x61\x79\x53\150\x69\x70\x6d\x65\x6e\x74\104\145\x74\141\151\154\x73\x2c\x20\163\150\x69\160\x6d\x65\x6e\x74\x3a\40\45\163", print_r($J7zSn, true)); if (empty($J7zSn) || empty($J7zSn["\151\x64"])) { return; } echo sprintf("\x3c\144\x69\x76\40\x63\154\141\163\x73\75\42\x73\150\x69\x70\x6d\145\156\x74\x44\145\164\141\x69\154\x73\42\x20\144\141\164\x61\x2d\x73\150\151\160\x6d\145\156\x74\137\x69\x64\75\42\x25\x73\42\x20\x73\164\171\154\x65\75\42\144\151\163\x70\x6c\x61\x79\x3a\40\x25\x73\x3b\x22\x3e", $J7zSn["\151\144"], $HiNiO ? "\x62\154\157\143\153" : "\156\157\x6e\x65"); $m5GJU = apply_filters($this->id . "\137\x67\145\x74\x53\150\151\x70\155\145\156\x74\x55\x72\154", '', $J7zSn); if (false === empty($m5GJU)) { echo "\x3c\160\x20\x73\x74\171\x6c\145\x3d\42\x77\x6f\162\x64\x2d\167\x72\141\x70\x3a\x20\142\162\x65\x61\153\55\167\x6f\x72\x64\73\x22\x3e"; echo sprintf("\74\163\x74\162\x6f\156\147\76\x25\x73\74\57\x73\164\162\157\156\x67\x3e", __("\x53\150\151\160\x6d\x65\156\164\72", $this->id)); echo sprintf("\x20\x3c\x61\x20\x68\x72\145\146\75\x22\45\x73\x22\40\45\x73\76\x25\x73\74\x2f\141\76", empty($m5GJU) ? "\43" : $m5GJU, false === empty($m5GJU) ? "\164\141\x72\x67\145\x74\x3d\x22\137\x62\x6c\141\156\153\42" : '', $J7zSn["\151\x64"]); echo "\x3c\x2f\x70\x3e"; echo "\74\150\162\57\x3e"; } if (false === empty($J7zSn["\x73\x65\162\x76\x69\143\145"]) && false === empty($J7zSn["\x72\141\x74\145\x73"][$J7zSn["\x73\x65\x72\166\151\143\145"]])) { $G9qXm = $J7zSn["\162\x61\x74\x65\x73"][$J7zSn["\x73\145\x72\x76\x69\x63\x65"]]; echo sprintf("\x3c\x64\x69\x76\x3e\x3c\x73\164\162\157\156\x67\76\45\163\74\57\163\164\x72\157\156\147\x3e\x3c\57\144\x69\166\x3e", $G9qXm["\x70\157\x73\x74\x61\x67\145\x5f\144\145\163\143\x72\151\x70\x74\151\157\156"]); if (false === empty($G9qXm["\x64\x65\x6c\151\x76\x65\x72\x79\137\x74\x69\155\x65\137\x64\145\x73\143\x72\x69\160\164\151\157\156"])) { echo sprintf("\74\144\151\x76\76\x3c\163\155\141\154\154\76\x25\163\74\x2f\x73\x6d\x61\154\154\76\x3c\x2f\144\x69\x76\76", $G9qXm["\x64\145\154\151\x76\x65\162\171\137\164\x69\x6d\x65\x5f\x64\145\163\143\162\x69\x70\x74\151\x6f\156"]); } if (false === empty($G9qXm["\x74\x72\x61\x63\x6b\151\156\147\137\x74\x79\160\145\x5f\144\145\x73\x63\162\151\x70\x74\x69\157\156"])) { echo sprintf("\x3c\144\x69\x76\76\x3c\163\x6d\141\x6c\x6c\76\45\x73\x3c\x2f\163\x6d\x61\x6c\154\76\74\x2f\144\x69\166\x3e", $G9qXm["\164\x72\x61\143\x6b\x69\156\x67\x5f\164\x79\160\x65\137\x64\145\x73\x63\x72\151\160\164\151\157\156"]); } } elseif (false === empty($J7zSn["\x73\145\x72\x76\x69\143\145"])) { $fpDPG = apply_filters($this->id . "\x5f\x73\145\x72\166\151\x63\x65\137\x6e\141\x6d\145", '', $J7zSn["\x73\145\x72\x76\151\143\x65"]); if (false === empty($fpDPG)) { echo sprintf("\74\144\151\x76\76\74\x73\164\x72\x6f\156\x67\x3e\x25\163\x3c\57\x73\x74\x72\x6f\156\147\76\74\57\x64\x69\166\x3e", $fpDPG); } } do_action($this->id . "\x5f\142\145\146\157\162\145\137\141\144\155\x69\156\x5f\163\x68\x69\x70\x6d\145\156\x74\137\x64\145\x74\x61\x69\154\163", $J7zSn); if (false === empty($J7zSn["\143\141\162\162\151\145\x72\x5f\x74\162\x61\x63\153\151\x6e\x67\137\143\x6f\x64\145"]) && false === empty($J7zSn["\164\x72\x61\x63\153\151\156\147\137\x75\x72\154"])) { echo sprintf("\74\x70\76\x3c\163\164\x72\157\156\x67\x3e\x25\163\74\x2f\163\164\x72\x6f\156\x67\x3e\40\x3c\x61\x20\x68\x72\145\146\75\42\x25\163\42\40\x74\141\162\147\x65\x74\75\42\x5f\142\154\x61\156\153\42\76\45\163\x3c\x2f\141\x3e\x3c\x2f\x70\x3e", __("\124\162\x61\143\x6b\151\x6e\147\72", $this->id), $J7zSn["\x74\162\x61\143\153\151\156\147\x5f\165\x72\154"], $J7zSn["\x63\141\162\x72\x69\145\x72\x5f\x74\162\x61\x63\153\x69\x6e\x67\137\x63\157\144\145"]); } elseif (false === empty($J7zSn["\x63\141\x72\x72\151\x65\x72\137\x74\162\141\x63\x6b\x69\156\147\x5f\x63\157\x64\145"])) { echo sprintf("\x3c\160\x3e\x3c\163\164\162\157\156\x67\x3e\x25\x73\x3c\x2f\x73\164\162\157\156\x67\x3e\x20\x25\x73\74\x2f\160\76", __("\x54\x72\141\x63\x6b\x69\x6e\147\72", $this->id), $J7zSn["\x63\141\162\x72\151\x65\x72\137\x74\x72\141\143\x6b\x69\x6e\147\137\x63\x6f\x64\x65"]); } if (false === empty($J7zSn["\163\164\141\164\x75\163\x5f\x6e\x61\x6d\x65"])) { echo sprintf("\x3c\x70\x3e\x3c\x73\x74\162\157\x6e\x67\76\x25\x73\74\57\163\164\162\157\x6e\x67\x3e\40\x3c\163\x70\x61\x6e\76\45\x73\74\x2f\163\160\x61\x6e\x3e\74\x2f\160\76", __("\x53\164\x61\164\x75\x73\x3a", $this->id), $J7zSn["\163\164\x61\x74\x75\163\137\156\141\155\145"]); } if (false === empty($J7zSn["\164\x72\141\x63\153\151\156\x67\137\145\166\145\x6e\x74\163"])) { echo "\74\150\162\57\x3e"; foreach ($J7zSn["\164\x72\x61\x63\153\x69\156\x67\137\x65\x76\x65\x6e\164\163"] as $RrvMU => $G7Eqo) { if ($RrvMU > 0) { echo "\x3c\142\162\x2f\76"; } echo "\x3c\144\151\166\76"; if (false === empty($G7Eqo["\164\151\x74\154\145"])) { echo sprintf("\74\163\164\162\157\x6e\147\76\45\163\x3c\x2f\163\164\x72\157\x6e\x67\x3e", $G7Eqo["\164\x69\x74\x6c\145"]); if (false === empty($G7Eqo["\163\x75\x62\164\151\164\154\145"]) || false === empty($G7Eqo["\143\162\x65\141\164\145\144\137\x61\164"])) { echo "\74\x62\x72\x2f\76"; } } if (false === empty($G7Eqo["\x73\165\x62\x74\x69\x74\x6c\145"])) { echo sprintf("\x3c\163\x6d\141\x6c\x6c\76\x25\x73\74\x2f\x73\x6d\x61\154\154\76", $G7Eqo["\163\x75\x62\x74\x69\x74\x6c\x65"]); if (false === empty($G7Eqo["\x63\x72\145\x61\164\x65\x64\137\141\164"])) { echo "\74\142\162\57\76"; } } if (false === empty($G7Eqo["\x63\x72\145\x61\x74\145\x64\137\141\x74"])) { echo sprintf("\x3c\163\155\x61\154\154\x3e\45\163\x3c\x2f\163\x6d\141\x6c\x6c\x3e", $G7Eqo["\143\162\x65\x61\x74\145\x64\x5f\x61\164"]); } echo "\x3c\x2f\144\151\166\x3e"; d1ciD: } Kn8nV: } $KYHJJ = ''; if (false === empty($J7zSn["\x70\x6f\x73\164\x61\147\145\137\154\141\x62\x65\154\137\x70\x6e\147\137\x75\x72\x6c"])) { $KYHJJ .= sprintf("\74\x61\x20\x68\x72\x65\146\x3d\42\45\163\42\x20\164\141\162\147\x65\x74\x3d\42\137\x62\x6c\x61\156\x6b\42\x3e\45\163\74\57\x61\x3e", $J7zSn["\160\157\163\x74\x61\147\145\x5f\x6c\x61\x62\145\154\137\x70\156\147\x5f\x75\162\154"], __("\x50\116\107", $this->id)); } if (false === empty($J7zSn["\x70\x6f\163\164\141\147\145\x5f\154\141\x62\x65\154\x5f\160\144\x66\x5f\x75\x72\x6c"])) { if (false === empty($KYHJJ)) { $KYHJJ .= "\x20\174\40"; } $KYHJJ .= sprintf("\x3c\141\x20\150\162\x65\x66\75\42\x25\x73\42\40\164\141\x72\147\145\x74\x3d\x22\x5f\x62\154\141\x6e\x6b\x22\x3e\45\x73\74\x2f\x61\x3e", $J7zSn["\x70\x6f\163\164\141\147\145\137\x6c\x61\142\145\x6c\137\x70\x64\x66\x5f\165\x72\154"], __("\120\104\x46", $this->id)); } if (empty($KYHJJ) && false === empty($J7zSn["\x70\x6f\163\164\141\x67\145\137\x6c\141\142\x65\x6c"])) { foreach ($J7zSn["\x70\157\x73\164\x61\x67\x65\137\x6c\141\x62\x65\154"] as $pwu88) { if (false === empty($KYHJJ)) { $KYHJJ .= "\40\174\40"; } $KYHJJ .= sprintf("\x3c\141\40\150\162\x65\x66\75\x22\x25\163\x22\x20\x64\141\164\x61\55\163\x68\151\x70\155\x65\156\x74\x5f\x69\144\75\42\45\163\42\40\x63\154\141\163\163\75\42\x64\157\167\x6e\154\x6f\141\x64\42\40\164\x61\162\x67\x65\164\75\42\x5f\142\x6c\x61\156\153\x22\76\45\x73\74\57\x61\76", $pwu88["\165\x72\x6c"], $J7zSn["\151\144"], strtoupper($pwu88["\146\151\x6c\145\137\x74\171\160\145"] ?? $pwu88["\146\x69\154\x65\124\x79\160\x65"] ?? "\160\x64\x66")); Mc5VZ: } VDmfz: } if (false === empty($KYHJJ)) { echo "\x3c\150\x72\x2f\76"; echo sprintf("\74\160\x3e\x3c\x73\164\162\x6f\x6e\147\x3e\45\x73\74\57\x73\x74\x72\x6f\156\x67\76\x20\45\163\x3c\57\x70\x3e", __("\x4c\141\142\x65\x6c\72", $this->id), $KYHJJ); } if (false === empty($J7zSn["\x66\157\162\155\163"])) { echo "\x3c\150\162\x2f\76"; echo sprintf("\74\160\76\74\x73\164\162\x6f\156\x67\76\45\x73\74\57\x73\x74\162\157\x6e\147\x3e\x3c\x62\x72\57\x3e", __("\106\x6f\162\155\x73\x3a", $this->id)); foreach ($J7zSn["\x66\157\162\155\163"] as $wjk5v) { $VlSUk = strtoupper(preg_replace("\x2f\137\57", "\x20", $wjk5v["\144\157\143\165\x6d\145\156\164\137\x74\x79\160\145"] ?? $wjk5v["\164\x79\x70\x65"])); echo sprintf("\x2d\x20\74\141\40\150\162\145\146\x3d\x22\x25\163\x22\x20\x74\x61\x72\147\145\x74\x3d\x22\137\x62\x6c\x61\x6e\x6b\x22\x3e\45\x73\74\57\141\x3e\74\142\x72\x2f\x3e", $wjk5v["\x75\x72\154"], $VlSUk); HbTjE: } mrsvm: echo "\x3c\x2f\x70\x3e"; } echo "\74\150\x72\57\76"; $fPYvP = false; if (apply_filters($this->id . "\137\x68\x61\x73\107\145\164\x53\150\x69\x70\155\x65\x6e\x74\x46\145\141\164\x75\x72\145", false)) { echo sprintf("\74\x70\x3e\x3c\141\40\150\x72\x65\146\75\x22\43\42\40\144\x61\164\x61\55\x73\x68\151\160\155\x65\156\x74\x5f\151\x64\75\x22\x25\x73\x22\40\143\x6c\141\x73\163\x3d\x22\162\x65\146\x72\x65\163\x68\x53\150\x69\160\x6d\x65\x6e\x74\x22\76\x25\163\74\57\x61\x3e\74\57\x70\x3e", $J7zSn["\151\x64"], __("\122\x65\x66\162\145\163\x68\40\x3e", $this->id)); $fPYvP = true; } if ("\171\145\x73" === $this->settings["\x61\154\x6c\157\x77\x44\145\154\145\164\x65\106\145\x61\x74\x75\x72\x65"] && apply_filters($this->id . "\x5f\143\141\156\103\141\x6e\x63\x65\154", false, $J7zSn)) { echo sprintf("\74\x70\76\74\x61\x20\150\162\x65\146\x3d\42\x23\42\x20\144\x61\164\141\x2d\163\x68\x69\x70\155\145\156\x74\x5f\151\x64\x3d\x22\45\163\42\40\x63\x6c\141\x73\x73\75\x22\x63\141\156\x63\145\154\123\150\151\160\x6d\145\x6e\164\42\76\45\163\x3c\57\141\76\x3c\x2f\x70\76", $J7zSn["\151\144"], __("\x43\x61\x6e\143\145\x6c\x20\123\x68\151\160\155\145\x6e\164\x20\x3e", $this->id)); $fPYvP = true; } if ("\171\145\163" === $this->settings["\141\154\154\x6f\167\x55\156\154\151\x6e\153\106\x65\141\164\165\162\145"] && apply_filters($this->id . "\x5f\143\x61\x6e\x55\x6e\154\x69\156\x6b", true, $J7zSn)) { echo sprintf("\x3c\x70\76\x3c\x61\40\x68\162\145\146\75\42\43\42\40\144\141\x74\141\x2d\x73\150\x69\160\x6d\x65\156\164\137\151\144\x3d\x22\x25\x73\x22\x20\x63\x6c\141\x73\x73\x3d\x22\165\x6e\154\x69\156\x6b\x53\x68\151\160\x6d\x65\x6e\164\x22\x3e\x25\163\74\57\141\x3e\74\x2f\160\76", $J7zSn["\x69\144"], __("\125\156\154\151\156\153\40\123\150\151\x70\x6d\x65\156\x74\40\x3e", $this->id)); $fPYvP = true; } if ("\171\145\163" === $this->settings["\141\154\x6c\x6f\x77\122\x65\x66\165\x6e\x64\x46\x65\141\164\x75\x72\x65"] && apply_filters($this->id . "\x5f\x63\x61\156\122\145\x66\165\x6e\x64", false, $J7zSn)) { echo sprintf("\x3c\160\76\74\x61\x20\x68\162\145\x66\75\42\43\42\40\144\141\164\141\55\x73\x68\x69\160\155\x65\156\x74\137\151\144\75\42\x25\163\42\40\x63\x6c\141\163\x73\75\x22\162\x65\x66\x75\156\x64\x53\150\151\x70\x6d\145\x6e\x74\42\76\x25\163\74\57\x61\76\74\x2f\x70\76", $J7zSn["\151\144"], __("\122\145\x71\165\145\163\164\x20\141\x20\122\x65\x66\x75\156\144\x20\76", $this->id)); $fPYvP = true; } if (apply_filters($this->id . "\x5f\x63\x61\156\x42\x75\171", false, $J7zSn)) { echo sprintf("\74\160\76\74\x61\40\150\162\145\146\x3d\x22\43\x22\40\144\x61\164\141\55\163\x68\151\x70\155\x65\x6e\x74\137\151\144\75\x22\x25\x73\x22\40\x63\x6c\141\x73\x73\75\42\x62\165\171\123\150\151\x70\x6d\x65\x6e\164\x22\76\45\x73\74\x2f\141\x3e\74\x2f\x70\76", $J7zSn["\151\x64"], __("\x42\165\171\40\123\150\x69\160\x70\x69\x6e\x67\x20\x4c\x61\142\x65\x6c\40\76", $this->id)); $fPYvP = true; } if ($fPYvP) { echo "\x3c\150\162\57\76"; } echo "\x3c\57\144\x69\166\76"; } private function prepareParcels(array $CoIJQ) : array { if (empty($CoIJQ)) { return []; } foreach ($CoIJQ as $ITdW6 => $NiaEJ) { if (empty($NiaEJ["\x62\x6f\170\x4e\141\155\x65"]) && false === empty($NiaEJ["\x6e\141\155\145"])) { $NiaEJ["\142\x6f\x78\x4e\141\x6d\x65"] = $NiaEJ["\x6e\141\155\x65"]; } $NiaEJ["\x62\157\x78\x4e\x61\155\145"] .= sprintf("\x20\50\x25\163\x29", __("\144\145\x74\145\x63\164\145\x64", $this->id)); unset($NiaEJ["\143\165\162\162\x65\156\143\x79"]); $CoIJQ[$ITdW6] = $NiaEJ; bNJrz: } ZoqDG: foreach ((array) $this->settings["\x62\x6f\x78\145\x73"] as $hfdgv) { if ("\x79\145\x73" === $hfdgv["\145\x6e\141\x62\154\145\144"]) { unset($hfdgv["\x77\x65\x69\x67\150\164"]); $hfdgv["\142\157\x78\x4e\x61\x6d\145"] .= sprintf("\40\50\45\163\51", __("\x70\162\x65\163\x65\x74", $this->id)); $CoIJQ[] = $hfdgv; } lUWjp: } hip3E: $this->logger->debug(__FILE__, 2131, "\120\x61\x72\143\x65\x6c\x73\x3a\40\x25\163", print_r($CoIJQ, true)); return $CoIJQ; } private function getServices() : array { return apply_filters($this->id . "\x5f\147\x65\164\123\x65\x72\166\151\143\x65\163", []); } private function deletePackageCache(int $HM0Dk) : void { $this->cache->delete($this->getPackageCacheKey($HM0Dk)); } private function setPackageCache(int $HM0Dk, array $bs3Qa) : void { $this->cache->set($this->getPackageCacheKey($HM0Dk), $bs3Qa, self::CACHE_EXPIRATION_IN_SECONDS); } private function getPackageCache(int $HM0Dk) : array { $this->cache->setUseCache(true); $bs3Qa = $this->cache->get($this->getPackageCacheKey($HM0Dk)) ?? []; $this->cache->setUseCache("\x79\x65\x73" === $this->settings["\143\141\143\x68\145"]); return $bs3Qa; } private function setVendorId(int $z8b7C) : void { if ($this->vendorId === $z8b7C) { return; } $this->logger->debug(__FILE__, 2196, "\x73\x65\164\x56\145\156\144\157\x72\x49\144\72\x20" . $z8b7C); $this->vendorId = $z8b7C; $this->vendorSettingsLoader->withVendorId($z8b7C)->load(); } }

Function Calls

None

Variables

None

Stats

MD5 54f73cb2880084a58ed9231ed92b0328
Eval Count 0
Decode Time 85 ms