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 OneTeamS..
Decoded Output download
<?php
declare (strict_types=1);
namespace OneTeamSoftware\WC\Shipping;
use OneTeamSoftware\Cache\Cache;
use OneTeamSoftware\Cache\CacheInterface;
use OneTeamSoftware\Cache\KeyGenerator;
use OneTeamSoftware\Cache\KeyGeneratorInterface;
use OneTeamSoftware\LazyClassProxy\LazyClassProxy;
use OneTeamSoftware\Packages\GuzzleHttp\Client as GuzzleHttpClient;
use OneTeamSoftware\Parcel\Fitter;
use OneTeamSoftware\Parcel\SingleItemPacker;
use OneTeamSoftware\ShippingCarrier\AbstractAdapter\AdapterInterface;
use OneTeamSoftware\ShippingCarrier\AbstractAdapter\Http\Client;
use OneTeamSoftware\UnitConverter\DimensionConverter;
use OneTeamSoftware\UnitConverter\WeightConverter;
use OneTeamSoftware\WC\Admin\LogExporter\LogExporter;
use OneTeamSoftware\WC\Logger\Logger;
use OneTeamSoftware\WC\Parcel\Packer;
use OneTeamSoftware\WC\Shipping\Builder\AddressBuilder;
use OneTeamSoftware\WC\Shipping\Builder\DimensionsBuilder;
use OneTeamSoftware\WC\Shipping\Builder\FormSettingsBuilder;
use OneTeamSoftware\WC\Shipping\Builder\ItemAlterer;
use OneTeamSoftware\WC\Shipping\Builder\ItemBuilder;
use OneTeamSoftware\WC\Shipping\Builder\ItemsAlterer;
use OneTeamSoftware\WC\Shipping\Builder\ItemsBuilder;
use OneTeamSoftware\WC\Shipping\Builder\ParcelBuilder;
use OneTeamSoftware\WC\Shipping\Builder\ShipmentBuilder;
use OneTeamSoftware\WC\Shipping\Builder\WeightBuilder;
use OneTeamSoftware\WC\Shipping\Hooks\Adapter as AdapterHooks;
use OneTeamSoftware\WC\Shipping\Hooks\SettingsForm as SettingsFormHooks;
use OneTeamSoftware\WP\Admin\OneTeamSoftware;
use OneTeamSoftware\WP\Cache\Storage\Transient;
use WP_Error;
class Plugin
{
protected static $instances = [];
protected $id;
protected $mainMenuId;
protected $adapterName;
protected $title;
protected $description;
protected $optionKey;
protected $settings;
protected $defaultSettings;
protected $pluginSettings;
protected $pluginPath;
protected $version;
protected $adapter;
protected $adapterHooks;
protected $settingsFormHooks;
protected $logger;
protected $pageDetector;
protected $cartProxy;
protected $sessionProxy;
protected $cache;
protected $keyGenerator;
protected $httpClient;
protected $client;
protected $weightConverter;
protected $dimensionConverter;
protected $logExporter;
protected $weightUnit;
protected $dimensionUnit;
protected $currency;
protected $itemAlterer;
protected $itemsAlterer;
protected $parcelPacker;
protected $addressBuilder;
protected $dimensionsBuilder;
protected $weightBuilder;
protected $itemsBuilder;
protected $shipmentBuilder;
protected $formSettingsBuilder;
protected $onPluginsLoaded;
public static function getInstance(string $ZLNlC): ?Plugin
{
return self::$instances[$ZLNlC] ?? null;
}
public function __construct(string $LCNZu, string $uY4mC, string $D_Nw0, string $OXU_a = null, callable $vwhiM)
{
$this->id = str_replace("-pro", '', basename($LCNZu, ".php"));
$this->pluginPath = $LCNZu;
$this->adapterName = $uY4mC;
$this->description = $D_Nw0;
$this->version = $OXU_a;
$this->optionKey = sprintf("woocommerce_%s_settings", $this->id);
$this->settings = [];
$this->defaultSettings = [];
$this->pluginSettings = [];
$this->mainMenuId = "oneteamsoftware";
$this->adapter = null;
$this->adapterHooks = null;
$this->settingsFormHooks = null;
$this->logger = new Logger($this->id);
$this->cartProxy = new LazyClassProxy("stdClass");
$this->sessionProxy = new LazyClassProxy("stdClass");
$this->cache = new Cache(new Transient());
$this->keyGenerator = new KeyGenerator();
$this->httpClient = new GuzzleHttpClient(["http_errors" => false]);
$this->client = new Client($this->httpClient, $this->logger);
$this->weightUnit = get_option("woocommerce_weight_unit") ?: "kg";
$this->dimensionUnit = get_option("woocommerce_dimension_unit") ?: "cm";
$this->currency = function_exists("get_woocommerce_currency") ? get_woocommerce_currency() : "USD";
$this->weightConverter = new WeightConverter($this->weightUnit);
$this->dimensionConverter = new DimensionConverter($this->dimensionUnit);
$this->logExporter = new LogExporter($this->id, get_class($this));
$this->parcelPacker = null;
$this->itemAlterer = null;
$this->itemsAlterer = null;
$this->addressBuilder = null;
$this->dimensionsBuilder = null;
$this->weightBuilder = null;
$this->itemsBuilder = null;
$this->shipmentBuilder = null;
$this->formSettingsBuilder = null;
$this->onPluginsLoaded = $vwhiM;
self::$instances[$this->id] = $this;
}
public function getAdapter(): AdapterInterface
{
return $this->adapter;
}
public function getCache(): CacheInterface
{
return $this->cache;
}
public function getKeyGenerator(): KeyGeneratorInterface
{
return $this->keyGenerator;
}
public function getLogger(): Logger
{
return $this->logger;
}
public function getWeightConverter(): WeightConverter
{
return $this->weightConverter;
}
public function getDimensionConverter(): DimensionConverter
{
return $this->dimensionConverter;
}
public function getLogExporter(): LogExporter
{
return $this->logExporter;
}
public function getParcelPacker(): Packer
{
return $this->parcelPacker;
}
public function getShipmentBuilder(): ShipmentBuilder
{
return $this->shipmentBuilder;
}
public function getPluginId(): string
{
return $this->id;
}
public function getTitle(): string
{
return $this->title;
}
public function getDescription(): string
{
return $this->description;
}
public function getPluginPath(): string
{
return $this->pluginPath;
}
public function getVersion(): string
{
return $this->version;
}
public function isActivated(): bool
{
return false;
}
public function register(): void
{
if (!function_exists("is_plugin_active")) {
require_once ABSPATH . "wp-admin/includes/plugin.php";
}
if (!is_plugin_active("woocommerce/woocommerce.php")) {
return;
}
$fI79I = preg_replace("/(\.php|\/)/i", "-pro\1", plugin_basename($this->pluginPath));
if (is_plugin_active($fI79I)) {
return;
}
$this->logExporter->register();
$this->initAdapter();
$this->initParcelPacker();
$this->initBuilders();
$this->initAdapterHooks();
$this->initDefaultSettings();
$this->loadSettings();
if (is_admin()) {
OneTeamSoftware::instance()->register();
add_action("admin_menu", [$this, "onAdminMenu"]);
}
add_filter("plugin_action_links_" . plugin_basename($this->pluginPath), [$this, "onPluginActionLinks"], 1, 1);
add_filter("woocommerce_shipping_methods", [$this, "addShippingMethod"]);
add_filter($this->id . "_getPluginSettings", [$this, "getPluginSettings"], 1, 0);
add_filter($this->id . "_getDefaultSettings", [$this, "getDefaultSettings"], 1, 0);
add_filter($this->id . "_service_name", [$this, "getDefaultServiceName"], 1, 2);
add_filter($this->id . "_init_form_fields", [$this, "setFormFieldDefaults"], 1, 1);
add_filter($this->id . "_init_instance_form_fields", [$this, "setFormFieldDefaults"], 1, 1);
add_action("plugins_loaded", [$this, "onPluginsLoaded"], 1, 0);
add_action("woocommerce_after_checkout_validation", [$this, "onCheckoutValidation"], PHP_INT_MAX, 2);
add_filter("woocommerce_billing_fields", [$this, "setRequiredFields"], 10, 1);
add_filter("woocommerce_shipping_fields", [$this, "setRequiredFields"], 10, 1);
}
public function setRequiredFields(array $NR7kk): array
{
if ("yes" !== $this->settings["requireCompanyName"]) {
return $NR7kk;
}
if (isset($NR7kk["billing_company"])) {
$NR7kk["billing_company"]["required"] = true;
}
if (isset($NR7kk["shipping_company"])) {
$NR7kk["shipping_company"]["required"] = true;
}
return $NR7kk;
}
public function onCheckoutValidation(array $kSJFn, WP_Error $HspdS): void
{
if ($this->settings["validateAddress"] !== "yes") {
return;
}
$this->initLazyClassProxies();
$fOhpy = $this->sessionProxy->get($this->id . "_validationErrors");
if (empty($fOhpy)) {
$fOhpy = [];
}
$this->logger->debug(__FILE__, 568, "onCheckoutValidation: %s", print_r($fOhpy, true));
foreach ($fOhpy as $BqmGR => $GxTN_) {
$yfCRl = '';
if ($BqmGR === "origin") {
$yfCRl = __("From Address:", $this->id);
} elseif ($BqmGR === "destination") {
$yfCRl = __("Shipping Address:", $this->id);
}
foreach ($GxTN_ as $NZY7j => $uuWop) {
$HspdS->add($this->id . "_validation_error_" . $NZY7j, sprintf("<strong>%s</strong> %s", $yfCRl, $uuWop));
YDfeo:
}
QT3I4: KzNVd:
}
d7894:
}
public function onAdminMenu(): void
{
add_submenu_page($this->mainMenuId, $this->title, $this->title, "manage_options", "admin.php?page=wc-settings&tab=shipping§ion=" . $this->id);
}
public function onPluginActionLinks(array $EbiVK): array
{
$DSjeu = sprintf("<a href="%s">%s</a>", admin_url("admin.php?page=wc-settings&tab=shipping§ion=" . $this->id), __("Settings", $this->id));
array_unshift($EbiVK, $DSjeu);
return $EbiVK;
}
public function onPluginsLoaded(): void
{
$this->initLazyClassProxies();
$this->initSettingsFormHooks();
$this->loadSettings();
if (is_callable($this->onPluginsLoaded)) {
call_user_func($this->onPluginsLoaded);
}
}
public function getPluginSettings(): array
{
return $this->pluginSettings;
}
public function getDefaultServiceName(string $QyYHy, string $M7w4L): string
{
if (empty($QyYHy)) {
$QyYHy = $this->adapter->getTypes()->getServices()->getValue($M7w4L);
}
return $QyYHy;
}
public function addShippingMethod(array $ow3xy): array
{
$IeM7c = __NAMESPACE__ . "\ShippingMethod_" . str_replace("-", "_", $this->id);
if (class_exists($IeM7c)) {
$ow3xy[$this->id] = $IeM7c;
}
return $ow3xy;
}
public function getDefaultSettings(): array
{
return $this->defaultSettings;
}
public function initSettingsFormHooks(): void
{
$this->settingsFormHooks = new SettingsFormHooks($this->id);
$this->settingsFormHooks->register();
}
public function initLazyClassProxies(): void
{
if (is_admin() || !function_exists("WC")) {
return;
}
$this->cartProxy = new LazyClassProxy("WC_Cart", WC()->cart);
$this->sessionProxy = new LazyClassProxy(apply_filters("woocommerce_session_handler", "WC_Session_Handler"), WC()->session);
}
public function setFormFieldDefaults(array $xilgv): array
{
foreach ($xilgv as $dVYoF => &$JCdso) {
if (isset($this->defaultSettings[$dVYoF])) {
$JCdso["default"] = $this->defaultSettings[$dVYoF];
}
lWlOk:
}
E9x6D:
return $xilgv;
}
protected function initAdapter(): void
{
$odkZW = "\OneTeamSoftware\ShippingCarrier\" . $this->adapterName . "\" . $this->adapterName;
$this->adapter = new $odkZW($this->id, $this->client, $this->logger, $this->keyGenerator, $this->cache);
$this->title = sprintf(__("%s Shipping", $this->id), $this->adapter->getName());
}
protected function initAdapterHooks(): void
{
$this->adapterHooks = new AdapterHooks($this->id, $this->adapter);
$this->adapterHooks->register();
}
protected function initParcelPacker(): void
{
$this->parcelPacker = new Packer($this->logger, new SingleItemPacker($this->logger, new Fitter($this->logger)), $this->weightConverter, $this->dimensionConverter);
}
protected function initBuilders(): void
{
$this->itemAlterer = new ItemAlterer();
$this->itemsAlterer = new ItemsAlterer($this->itemAlterer);
$this->addressBuilder = new AddressBuilder();
$this->dimensionsBuilder = new DimensionsBuilder($this->dimensionUnit);
$this->weightBuilder = new WeightBuilder($this->weightUnit);
$this->itemsBuilder = new ItemsBuilder(new ItemBuilder($this->dimensionsBuilder, $this->weightBuilder, $this->currency));
$this->formSettingsBuilder = new FormSettingsBuilder($this->adapter->getForm());
$this->shipmentBuilder = new ShipmentBuilder($this->logger, $this->addressBuilder, new ParcelBuilder($this->dimensionsBuilder, $this->weightBuilder, $this->itemsBuilder, $this->itemsAlterer, $this->currency), $this->formSettingsBuilder);
}
protected function initDefaultSettings(): void
{
$bpNqN = explode(":", get_option("woocommerce_default_country", ''));
$UjOaW = '';
if (count($bpNqN) > 0) {
$UjOaW = $bpNqN[0];
}
$qI6Zy = '';
if (count($bpNqN) > 1) {
$qI6Zy = $bpNqN[1];
}
$this->defaultSettings = ["licenseKey" => '', "debug" => "no", "cache" => "yes", "cacheExpirationInSecs" => 24 * 60 * 60, "timeout" => 45, "sandbox" => "yes", "validateProducts" => "no", "displayAdvancedSettings" => "no", "combineBoxes" => "yes", "useCubeDimensions" => "no", "enableLiveShippingRates" => "yes", "validateAddress" => "no", "requireCompanyName" => "no", "cod" => "no", "cod_method" => $this->adapter->getTypes()->getCodMethods()->getDefaultKey(), "insurance" => "no", "signature" => "no", "signature_type" => '', "saturday_delivery" => "no", "hold_for_pickup" => "no", "requireCompanyName" => "no", "requireCountry" => "yes", "requireCity" => "no", "requirePostalCode" => "no", "requireAddress" => "no", "enableBulkShipmentCreation" => "no", "useServiceSettingsForBulkShipmentCreation" => "no", "requireToBulkCreateShipments" => "no", "requireToBulkPurchasePostage" => "no", "requireToBulkPurchaseNewPostage" => "no", "useSellerAddress" => "no", "useVendorSettings" => "no", "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", "pdfAutoPrint" => "no", "pdfAutoPrintDialog" => "yes", "importShipmentsEnabled" => "yes", "importShipmentsCronTaskInterval" => HOUR_IN_SECONDS, "importShipmentsMaxLimit" => 100, "createOrderEnabled" => "no", "createOrderCronTaskInterval" => HOUR_IN_SECONDS, "createOrderDelayBetweenAttempts" => DAY_IN_SECONDS, "createOrderMaxLimit" => 100, "updateShipmentsEnabled" => "yes", "updateShipmentsCronTaskInterval" => HOUR_IN_SECONDS / 2, "updateShipmentsFetchInterval" => HOUR_IN_SECONDS, "updateShipmentsStatusChangeTimeout" => 10 * DAY_IN_SECONDS, "updateShipmentsMaxLimit" => 100, "shippingZones" => "no", "displayDeliveryTime" => "no", "displayTrackingType" => "no", "mediaMail" => "exclude", "notifyForStatus" => [], "completeOrderForStatuses" => [], "fetchRatesPageCondition" => "any", "fetchRatesOnPages" => ["any", "cart", "checkout"], "defaultCountryOfOrigin" => $UjOaW, "defaultShipmentDescription" => __("Order Contents", $this->id), "updateShipmentsFetchInterval" => HOUR_IN_SECONDS, "updateShipmentsStatusChangeTimeout" => 10 * DAY_IN_SECONDS, "updateShipmentsMaxLimit" => 100, "origin" => ["company" => get_option("blogname"), "email" => get_option("admin_email"), "phone" => "18008888888", "address" => get_option("woocommerce_store_address", ''), "address_2" => get_option("woocommerce_store_address_2", ''), "postcode" => get_option("woocommerce_store_postcode", ''), "city" => get_option("woocommerce_store_city", ''), "state" => $qI6Zy, "country" => $UjOaW], "weight_unit" => $this->weightUnit, "dimension_unit" => $this->dimensionUnit, "defaultWeight" => round($this->weightConverter->convert(100, $this->weightUnit, "g"), 2), "defaultLength" => round($this->dimensionConverter->convert(100, $this->dimensionUnit, "mm"), 2), "defaultWidth" => round($this->dimensionConverter->convert(100, $this->dimensionUnit, "mm"), 2), "defaultHeight" => round($this->dimensionConverter->convert(50, $this->dimensionUnit, "mm"), 2)];
}
protected function loadSettings(): void
{
$this->settings = (array)get_option($this->optionKey, []);
unset($this->settings["weight_unit"]);
unset($this->settings["dimension_unit"]);
$this->settings = array_merge($this->getDefaultSettings(), $this->settings);
$this->pluginSettings = $this->settings;
$this->syncSettings();
}
protected function syncSettings(): void
{
$this->cache->setUseCache("yes" === $this->settings["cache"]);
$this->cache->setDefaultExpiresAfter(intval($this->settings["cacheExpirationInSecs"]));
$this->logger->setEnabled("yes" === $this->settings["debug"]);
$this->parcelPacker->setSettings($this->settings);
if (did_action("plugins_loaded")) {
$this->adapter->init($this->settings)->wait();
}
}
}
?>
Did this file decode correctly?
Original Code
<?php
declare (strict_types=1);
namespace OneTeamSoftware\WC\Shipping;
use OneTeamSoftware\Cache\Cache;
use OneTeamSoftware\Cache\CacheInterface;
use OneTeamSoftware\Cache\KeyGenerator;
use OneTeamSoftware\Cache\KeyGeneratorInterface;
use OneTeamSoftware\LazyClassProxy\LazyClassProxy;
use OneTeamSoftware\Packages\GuzzleHttp\Client as GuzzleHttpClient;
use OneTeamSoftware\Parcel\Fitter;
use OneTeamSoftware\Parcel\SingleItemPacker;
use OneTeamSoftware\ShippingCarrier\AbstractAdapter\AdapterInterface;
use OneTeamSoftware\ShippingCarrier\AbstractAdapter\Http\Client;
use OneTeamSoftware\UnitConverter\DimensionConverter;
use OneTeamSoftware\UnitConverter\WeightConverter;
use OneTeamSoftware\WC\Admin\LogExporter\LogExporter;
use OneTeamSoftware\WC\Logger\Logger;
use OneTeamSoftware\WC\Parcel\Packer;
use OneTeamSoftware\WC\Shipping\Builder\AddressBuilder;
use OneTeamSoftware\WC\Shipping\Builder\DimensionsBuilder;
use OneTeamSoftware\WC\Shipping\Builder\FormSettingsBuilder;
use OneTeamSoftware\WC\Shipping\Builder\ItemAlterer;
use OneTeamSoftware\WC\Shipping\Builder\ItemBuilder;
use OneTeamSoftware\WC\Shipping\Builder\ItemsAlterer;
use OneTeamSoftware\WC\Shipping\Builder\ItemsBuilder;
use OneTeamSoftware\WC\Shipping\Builder\ParcelBuilder;
use OneTeamSoftware\WC\Shipping\Builder\ShipmentBuilder;
use OneTeamSoftware\WC\Shipping\Builder\WeightBuilder;
use OneTeamSoftware\WC\Shipping\Hooks\Adapter as AdapterHooks;
use OneTeamSoftware\WC\Shipping\Hooks\SettingsForm as SettingsFormHooks;
use OneTeamSoftware\WP\Admin\OneTeamSoftware;
use OneTeamSoftware\WP\Cache\Storage\Transient;
use WP_Error;
class Plugin
{
protected static $instances = [];
protected $id;
protected $mainMenuId;
protected $adapterName;
protected $title;
protected $description;
protected $optionKey;
protected $settings;
protected $defaultSettings;
protected $pluginSettings;
protected $pluginPath;
protected $version;
protected $adapter;
protected $adapterHooks;
protected $settingsFormHooks;
protected $logger;
protected $pageDetector;
protected $cartProxy;
protected $sessionProxy;
protected $cache;
protected $keyGenerator;
protected $httpClient;
protected $client;
protected $weightConverter;
protected $dimensionConverter;
protected $logExporter;
protected $weightUnit;
protected $dimensionUnit;
protected $currency;
protected $itemAlterer;
protected $itemsAlterer;
protected $parcelPacker;
protected $addressBuilder;
protected $dimensionsBuilder;
protected $weightBuilder;
protected $itemsBuilder;
protected $shipmentBuilder;
protected $formSettingsBuilder;
protected $onPluginsLoaded;
public static function getInstance(string $ZLNlC): ?Plugin
{
return self::$instances[$ZLNlC] ?? null;
}
public function __construct(string $LCNZu, string $uY4mC, string $D_Nw0, string $OXU_a = null, callable $vwhiM)
{
$this->id = str_replace("\x2d\x70\162\x6f", '', basename($LCNZu, "\x2e\160\x68\x70"));
$this->pluginPath = $LCNZu;
$this->adapterName = $uY4mC;
$this->description = $D_Nw0;
$this->version = $OXU_a;
$this->optionKey = sprintf("\167\x6f\x6f\x63\x6f\x6d\155\145\162\143\x65\137\x25\x73\137\163\145\164\164\151\x6e\147\163", $this->id);
$this->settings = [];
$this->defaultSettings = [];
$this->pluginSettings = [];
$this->mainMenuId = "\x6f\x6e\145\x74\x65\x61\x6d\x73\157\x66\164\167\x61\x72\x65";
$this->adapter = null;
$this->adapterHooks = null;
$this->settingsFormHooks = null;
$this->logger = new Logger($this->id);
$this->cartProxy = new LazyClassProxy("\x73\x74\x64\103\154\x61\163\163");
$this->sessionProxy = new LazyClassProxy("\x73\x74\144\103\154\141\163\163");
$this->cache = new Cache(new Transient());
$this->keyGenerator = new KeyGenerator();
$this->httpClient = new GuzzleHttpClient(["\x68\x74\164\160\137\145\x72\x72\157\162\x73" => false]);
$this->client = new Client($this->httpClient, $this->logger);
$this->weightUnit = get_option("\x77\157\157\143\x6f\155\x6d\x65\162\x63\145\x5f\x77\145\151\147\150\164\137\x75\x6e\x69\164") ?: "\153\x67";
$this->dimensionUnit = get_option("\x77\x6f\x6f\143\x6f\155\x6d\x65\x72\143\145\x5f\x64\151\x6d\145\156\163\x69\157\156\x5f\x75\156\x69\x74") ?: "\143\x6d";
$this->currency = function_exists("\147\x65\164\x5f\x77\157\157\x63\x6f\x6d\x6d\x65\162\x63\145\x5f\x63\165\x72\162\x65\x6e\x63\171") ? get_woocommerce_currency() : "\125\123\104";
$this->weightConverter = new WeightConverter($this->weightUnit);
$this->dimensionConverter = new DimensionConverter($this->dimensionUnit);
$this->logExporter = new LogExporter($this->id, get_class($this));
$this->parcelPacker = null;
$this->itemAlterer = null;
$this->itemsAlterer = null;
$this->addressBuilder = null;
$this->dimensionsBuilder = null;
$this->weightBuilder = null;
$this->itemsBuilder = null;
$this->shipmentBuilder = null;
$this->formSettingsBuilder = null;
$this->onPluginsLoaded = $vwhiM;
self::$instances[$this->id] = $this;
}
public function getAdapter(): AdapterInterface
{
return $this->adapter;
}
public function getCache(): CacheInterface
{
return $this->cache;
}
public function getKeyGenerator(): KeyGeneratorInterface
{
return $this->keyGenerator;
}
public function getLogger(): Logger
{
return $this->logger;
}
public function getWeightConverter(): WeightConverter
{
return $this->weightConverter;
}
public function getDimensionConverter(): DimensionConverter
{
return $this->dimensionConverter;
}
public function getLogExporter(): LogExporter
{
return $this->logExporter;
}
public function getParcelPacker(): Packer
{
return $this->parcelPacker;
}
public function getShipmentBuilder(): ShipmentBuilder
{
return $this->shipmentBuilder;
}
public function getPluginId(): string
{
return $this->id;
}
public function getTitle(): string
{
return $this->title;
}
public function getDescription(): string
{
return $this->description;
}
public function getPluginPath(): string
{
return $this->pluginPath;
}
public function getVersion(): string
{
return $this->version;
}
public function isActivated(): bool
{
return false;
}
public function register(): void
{
if (!function_exists("\151\x73\x5f\160\154\x75\147\151\156\x5f\x61\x63\164\151\166\x65")) {
require_once ABSPATH . "\167\160\x2d\x61\x64\x6d\151\x6e\x2f\x69\x6e\143\x6c\165\144\145\x73\x2f\160\x6c\x75\x67\x69\156\56\160\x68\x70";
}
if (!is_plugin_active("\x77\x6f\x6f\x63\x6f\x6d\x6d\x65\x72\143\145\57\167\157\157\x63\157\155\x6d\x65\x72\x63\145\56\x70\x68\x70")) {
return;
}
$fI79I = preg_replace("\57\x28\x5c\x2e\160\150\160\x7c\134\57\51\57\151", "\55\x70\162\157\x5c\x31", plugin_basename($this->pluginPath));
if (is_plugin_active($fI79I)) {
return;
}
$this->logExporter->register();
$this->initAdapter();
$this->initParcelPacker();
$this->initBuilders();
$this->initAdapterHooks();
$this->initDefaultSettings();
$this->loadSettings();
if (is_admin()) {
OneTeamSoftware::instance()->register();
add_action("\141\x64\x6d\x69\156\137\x6d\x65\x6e\165", [$this, "\x6f\x6e\x41\x64\x6d\151\156\115\x65\156\x75"]);
}
add_filter("\160\154\165\x67\x69\156\x5f\141\143\164\x69\157\156\x5f\154\x69\156\x6b\x73\137" . plugin_basename($this->pluginPath), [$this, "\x6f\x6e\x50\154\165\x67\151\x6e\x41\143\164\x69\157\156\x4c\151\156\x6b\163"], 1, 1);
add_filter("\x77\157\157\x63\x6f\155\x6d\145\x72\x63\145\137\x73\x68\x69\x70\160\151\x6e\x67\x5f\x6d\145\x74\x68\x6f\144\x73", [$this, "\141\144\x64\x53\150\151\160\160\x69\156\147\115\145\x74\150\x6f\144"]);
add_filter($this->id . "\137\147\145\164\120\x6c\165\147\x69\156\123\x65\164\x74\151\156\x67\163", [$this, "\x67\x65\x74\120\154\x75\147\151\156\x53\x65\164\x74\151\x6e\x67\x73"], 1, 0);
add_filter($this->id . "\137\x67\x65\x74\104\145\x66\x61\x75\154\x74\123\145\164\x74\151\x6e\147\x73", [$this, "\x67\x65\x74\104\x65\146\141\165\x6c\164\123\x65\164\x74\151\156\147\163"], 1, 0);
add_filter($this->id . "\137\163\145\162\166\x69\143\x65\137\156\x61\x6d\145", [$this, "\147\145\x74\x44\x65\x66\141\165\154\164\x53\145\x72\x76\151\143\145\x4e\141\x6d\145"], 1, 2);
add_filter($this->id . "\x5f\x69\156\151\x74\x5f\x66\157\x72\155\x5f\x66\151\x65\x6c\x64\x73", [$this, "\x73\x65\164\106\157\x72\155\x46\151\145\x6c\x64\104\x65\x66\141\x75\x6c\x74\163"], 1, 1);
add_filter($this->id . "\x5f\x69\x6e\x69\x74\x5f\151\156\x73\164\x61\156\x63\145\137\146\157\x72\x6d\137\x66\151\145\x6c\x64\163", [$this, "\163\x65\x74\106\x6f\x72\x6d\x46\x69\x65\154\x64\104\x65\x66\x61\x75\x6c\164\x73"], 1, 1);
add_action("\x70\x6c\165\147\151\156\163\x5f\154\x6f\x61\144\x65\x64", [$this, "\157\x6e\120\x6c\165\147\x69\x6e\x73\x4c\157\141\144\x65\144"], 1, 0);
add_action("\167\x6f\157\x63\157\155\155\x65\x72\143\145\137\x61\x66\x74\145\162\137\x63\150\x65\x63\x6b\x6f\165\164\137\166\x61\x6c\x69\144\141\x74\151\157\x6e", [$this, "\x6f\x6e\x43\x68\x65\x63\153\157\x75\164\x56\141\x6c\x69\x64\x61\x74\x69\x6f\x6e"], PHP_INT_MAX, 2);
add_filter("\167\157\157\x63\x6f\x6d\155\145\x72\x63\145\137\x62\x69\154\x6c\x69\x6e\x67\137\146\151\145\x6c\x64\x73", [$this, "\163\x65\164\122\145\x71\165\151\162\x65\x64\106\151\x65\154\x64\x73"], 10, 1);
add_filter("\167\157\157\143\x6f\x6d\x6d\145\x72\143\145\137\x73\x68\151\x70\x70\151\x6e\147\x5f\x66\151\145\154\144\x73", [$this, "\163\x65\x74\122\145\x71\165\x69\x72\145\144\106\x69\145\154\x64\163"], 10, 1);
}
public function setRequiredFields(array $NR7kk): array
{
if ("\171\145\163" !== $this->settings["\x72\145\x71\165\x69\162\x65\103\157\x6d\160\x61\156\x79\x4e\x61\155\x65"]) {
return $NR7kk;
}
if (isset($NR7kk["\x62\x69\x6c\x6c\x69\x6e\147\x5f\x63\157\x6d\160\141\156\x79"])) {
$NR7kk["\x62\x69\x6c\x6c\x69\x6e\x67\x5f\143\157\155\x70\x61\x6e\171"]["\162\145\x71\165\151\162\x65\x64"] = true;
}
if (isset($NR7kk["\163\150\151\x70\160\151\x6e\x67\x5f\143\x6f\155\160\141\156\x79"])) {
$NR7kk["\x73\x68\x69\x70\x70\151\156\147\137\x63\157\155\160\141\156\171"]["\162\x65\x71\165\151\162\x65\x64"] = true;
}
return $NR7kk;
}
public function onCheckoutValidation(array $kSJFn, WP_Error $HspdS): void
{
if ($this->settings["\x76\141\154\x69\144\141\x74\145\x41\x64\144\x72\x65\163\163"] !== "\x79\x65\x73") {
return;
}
$this->initLazyClassProxies();
$fOhpy = $this->sessionProxy->get($this->id . "\137\166\141\x6c\151\x64\x61\x74\x69\157\156\105\162\162\x6f\x72\163");
if (empty($fOhpy)) {
$fOhpy = [];
}
$this->logger->debug(__FILE__, 568, "\157\156\103\x68\145\143\x6b\x6f\x75\x74\x56\141\154\151\144\141\x74\x69\x6f\x6e\x3a\40\x25\x73", print_r($fOhpy, true));
foreach ($fOhpy as $BqmGR => $GxTN_) {
$yfCRl = '';
if ($BqmGR === "\157\x72\151\x67\151\x6e") {
$yfCRl = __("\x46\162\157\155\x20\101\144\144\162\145\163\x73\x3a", $this->id);
} elseif ($BqmGR === "\144\145\x73\164\x69\x6e\x61\x74\x69\x6f\x6e") {
$yfCRl = __("\x53\x68\x69\x70\160\x69\x6e\x67\x20\101\144\144\162\x65\x73\163\72", $this->id);
}
foreach ($GxTN_ as $NZY7j => $uuWop) {
$HspdS->add($this->id . "\137\166\x61\154\151\x64\x61\164\151\157\156\x5f\x65\162\x72\157\162\137" . $NZY7j, sprintf("\x3c\x73\164\162\x6f\156\x67\x3e\45\163\x3c\x2f\x73\x74\162\x6f\156\x67\76\40\45\x73", $yfCRl, $uuWop));
YDfeo:
}
QT3I4: KzNVd:
}
d7894:
}
public function onAdminMenu(): void
{
add_submenu_page($this->mainMenuId, $this->title, $this->title, "\x6d\141\156\141\x67\x65\137\x6f\160\x74\x69\x6f\156\163", "\141\144\x6d\151\156\56\160\x68\x70\x3f\160\x61\147\145\x3d\x77\143\55\x73\x65\164\164\151\156\147\163\x26\x74\x61\142\x3d\163\x68\x69\x70\x70\x69\156\147\x26\x73\145\143\164\151\x6f\156\75" . $this->id);
}
public function onPluginActionLinks(array $EbiVK): array
{
$DSjeu = sprintf("\x3c\x61\40\150\x72\145\x66\x3d\x22\x25\x73\42\x3e\x25\163\x3c\57\x61\x3e", admin_url("\141\144\x6d\x69\x6e\x2e\x70\150\x70\x3f\x70\141\x67\x65\75\x77\x63\x2d\163\145\x74\x74\x69\156\147\x73\x26\164\141\x62\75\163\x68\151\160\x70\x69\156\x67\46\163\145\143\x74\151\x6f\156\75" . $this->id), __("\x53\145\164\x74\x69\x6e\147\x73", $this->id));
array_unshift($EbiVK, $DSjeu);
return $EbiVK;
}
public function onPluginsLoaded(): void
{
$this->initLazyClassProxies();
$this->initSettingsFormHooks();
$this->loadSettings();
if (is_callable($this->onPluginsLoaded)) {
call_user_func($this->onPluginsLoaded);
}
}
public function getPluginSettings(): array
{
return $this->pluginSettings;
}
public function getDefaultServiceName(string $QyYHy, string $M7w4L): string
{
if (empty($QyYHy)) {
$QyYHy = $this->adapter->getTypes()->getServices()->getValue($M7w4L);
}
return $QyYHy;
}
public function addShippingMethod(array $ow3xy): array
{
$IeM7c = __NAMESPACE__ . "\x5c\x53\150\x69\160\160\151\156\x67\115\x65\164\150\x6f\144\137" . str_replace("\x2d", "\137", $this->id);
if (class_exists($IeM7c)) {
$ow3xy[$this->id] = $IeM7c;
}
return $ow3xy;
}
public function getDefaultSettings(): array
{
return $this->defaultSettings;
}
public function initSettingsFormHooks(): void
{
$this->settingsFormHooks = new SettingsFormHooks($this->id);
$this->settingsFormHooks->register();
}
public function initLazyClassProxies(): void
{
if (is_admin() || !function_exists("\127\103")) {
return;
}
$this->cartProxy = new LazyClassProxy("\x57\103\137\103\x61\x72\164", WC()->cart);
$this->sessionProxy = new LazyClassProxy(apply_filters("\167\x6f\157\x63\157\x6d\x6d\145\162\143\145\137\x73\145\x73\x73\151\157\156\x5f\x68\x61\156\144\154\145\x72", "\127\x43\x5f\123\x65\163\163\x69\157\x6e\137\110\141\156\x64\x6c\x65\x72"), WC()->session);
}
public function setFormFieldDefaults(array $xilgv): array
{
foreach ($xilgv as $dVYoF => &$JCdso) {
if (isset($this->defaultSettings[$dVYoF])) {
$JCdso["\x64\x65\x66\x61\x75\154\164"] = $this->defaultSettings[$dVYoF];
}
lWlOk:
}
E9x6D:
return $xilgv;
}
protected function initAdapter(): void
{
$odkZW = "\134\x4f\156\x65\124\x65\x61\x6d\x53\x6f\x66\164\x77\141\x72\145\x5c\x53\150\151\160\160\x69\156\147\x43\141\x72\162\x69\x65\162\x5c" . $this->adapterName . "\134" . $this->adapterName;
$this->adapter = new $odkZW($this->id, $this->client, $this->logger, $this->keyGenerator, $this->cache);
$this->title = sprintf(__("\x25\x73\40\x53\150\x69\x70\160\151\x6e\147", $this->id), $this->adapter->getName());
}
protected function initAdapterHooks(): void
{
$this->adapterHooks = new AdapterHooks($this->id, $this->adapter);
$this->adapterHooks->register();
}
protected function initParcelPacker(): void
{
$this->parcelPacker = new Packer($this->logger, new SingleItemPacker($this->logger, new Fitter($this->logger)), $this->weightConverter, $this->dimensionConverter);
}
protected function initBuilders(): void
{
$this->itemAlterer = new ItemAlterer();
$this->itemsAlterer = new ItemsAlterer($this->itemAlterer);
$this->addressBuilder = new AddressBuilder();
$this->dimensionsBuilder = new DimensionsBuilder($this->dimensionUnit);
$this->weightBuilder = new WeightBuilder($this->weightUnit);
$this->itemsBuilder = new ItemsBuilder(new ItemBuilder($this->dimensionsBuilder, $this->weightBuilder, $this->currency));
$this->formSettingsBuilder = new FormSettingsBuilder($this->adapter->getForm());
$this->shipmentBuilder = new ShipmentBuilder($this->logger, $this->addressBuilder, new ParcelBuilder($this->dimensionsBuilder, $this->weightBuilder, $this->itemsBuilder, $this->itemsAlterer, $this->currency), $this->formSettingsBuilder);
}
protected function initDefaultSettings(): void
{
$bpNqN = explode("\x3a", get_option("\167\157\x6f\x63\x6f\155\155\x65\162\x63\145\137\x64\x65\x66\x61\165\154\164\x5f\143\x6f\165\156\x74\162\x79", ''));
$UjOaW = '';
if (count($bpNqN) > 0) {
$UjOaW = $bpNqN[0];
}
$qI6Zy = '';
if (count($bpNqN) > 1) {
$qI6Zy = $bpNqN[1];
}
$this->defaultSettings = ["\154\151\143\145\x6e\163\145\x4b\x65\x79" => '', "\144\145\x62\x75\x67" => "\x6e\x6f", "\x63\x61\143\150\145" => "\x79\145\x73", "\143\x61\x63\150\145\x45\x78\160\151\x72\x61\x74\x69\157\156\111\x6e\123\145\x63\x73" => 24 * 60 * 60, "\164\x69\x6d\145\157\165\164" => 45, "\x73\141\x6e\x64\x62\x6f\170" => "\x79\x65\163", "\166\x61\154\x69\144\x61\x74\145\x50\162\157\144\x75\x63\164\163" => "\x6e\157", "\x64\151\163\x70\154\x61\171\x41\144\166\x61\156\x63\145\x64\123\145\x74\x74\151\x6e\147\x73" => "\156\x6f", "\x63\157\155\142\x69\x6e\x65\102\x6f\170\x65\163" => "\171\x65\x73", "\165\163\145\x43\x75\142\145\104\151\x6d\x65\x6e\163\151\157\x6e\163" => "\156\x6f", "\x65\x6e\141\142\x6c\x65\x4c\151\166\145\123\x68\x69\x70\x70\151\x6e\x67\122\x61\x74\x65\163" => "\171\145\x73", "\166\x61\154\x69\144\x61\164\x65\x41\x64\x64\162\x65\x73\x73" => "\x6e\157", "\x72\145\161\x75\x69\x72\145\103\x6f\155\160\141\x6e\x79\116\141\x6d\145" => "\156\157", "\x63\157\x64" => "\x6e\x6f", "\x63\x6f\x64\x5f\155\x65\x74\150\x6f\144" => $this->adapter->getTypes()->getCodMethods()->getDefaultKey(), "\151\x6e\x73\165\x72\x61\156\143\145" => "\x6e\157", "\x73\151\x67\156\x61\x74\x75\162\x65" => "\156\157", "\x73\x69\147\156\141\x74\165\x72\x65\137\x74\171\160\145" => '', "\x73\x61\x74\165\x72\144\x61\x79\x5f\144\145\x6c\151\166\x65\162\171" => "\x6e\x6f", "\150\157\x6c\x64\137\x66\x6f\x72\x5f\160\151\x63\153\165\x70" => "\156\x6f", "\x72\x65\x71\165\151\x72\x65\103\x6f\155\160\141\156\171\116\x61\x6d\145" => "\x6e\157", "\x72\145\161\165\151\162\145\103\157\165\156\x74\162\171" => "\x79\145\163", "\162\145\161\x75\151\162\x65\x43\x69\164\x79" => "\156\x6f", "\162\x65\161\x75\151\162\x65\x50\x6f\163\x74\x61\x6c\103\157\x64\145" => "\156\x6f", "\162\x65\161\165\151\x72\x65\x41\x64\144\x72\145\163\x73" => "\x6e\157", "\145\x6e\x61\x62\154\x65\x42\x75\154\153\x53\x68\151\x70\155\145\156\x74\103\x72\145\141\164\x69\157\x6e" => "\x6e\157", "\165\163\x65\123\x65\162\x76\151\143\145\123\x65\164\x74\x69\x6e\x67\163\106\157\162\x42\165\154\153\x53\150\151\x70\155\x65\x6e\164\x43\162\145\141\164\151\x6f\x6e" => "\x6e\x6f", "\162\145\x71\165\x69\162\x65\124\157\102\165\x6c\153\x43\162\x65\x61\164\145\x53\x68\x69\160\155\145\156\164\x73" => "\x6e\157", "\162\145\x71\x75\151\162\x65\124\x6f\x42\x75\x6c\153\120\165\162\x63\150\141\163\145\120\x6f\x73\x74\141\147\x65" => "\156\x6f", "\x72\145\x71\x75\x69\x72\145\124\157\102\x75\x6c\x6b\x50\165\162\143\150\x61\x73\145\x4e\145\x77\x50\157\x73\164\141\x67\x65" => "\156\x6f", "\165\x73\145\x53\145\x6c\154\x65\x72\x41\144\144\162\x65\163\x73" => "\156\x6f", "\x75\x73\x65\x56\145\x6e\x64\157\x72\x53\x65\164\x74\151\156\x67\x73" => "\156\x6f", "\141\154\x6c\157\x77\115\165\154\x74\151\160\154\145\123\150\151\160\155\x65\x6e\164\163" => "\x79\x65\x73", "\x61\x6c\x6c\157\x77\103\162\x65\x61\164\145\123\150\x69\160\x6d\145\x6e\164\106\x65\x61\164\165\x72\145" => "\171\x65\163", "\x61\x6c\x6c\x6f\167\x4c\x69\x6e\x6b\106\x65\141\164\165\x72\145" => "\x79\145\x73", "\141\154\x6c\x6f\x77\125\x6e\154\x69\x6e\x6b\106\145\x61\164\x75\x72\x65" => "\x79\145\x73", "\x61\x6c\x6c\157\167\x44\x65\154\145\164\x65\x46\145\x61\x74\x75\x72\x65" => "\x79\145\x73", "\x61\x6c\154\157\x77\x52\x65\146\x75\x6e\144\106\x65\x61\164\165\x72\x65" => "\x79\x65\x73", "\x61\x6c\x6c\157\x77\122\x65\164\x75\162\x6e\x4c\141\142\145\154\x46\x65\141\x74\x75\162\x65" => "\x79\x65\x73", "\141\x6c\154\x6f\x77\x4d\145\x64\x69\x61\x4d\x61\151\x6c\106\x65\141\x74\x75\x72\x65" => "\171\145\163", "\141\x6c\x6c\x6f\x77\x43\157\x64\x46\x65\141\164\x75\162\x65" => "\171\x65\x73", "\x61\154\x6c\x6f\167\x49\156\163\x75\162\x61\156\x63\145\106\x65\x61\164\165\x72\x65" => "\x79\145\163", "\x61\x6c\x6c\x6f\167\123\151\147\156\x61\164\165\x72\x65\106\x65\141\x74\165\162\x65" => "\171\x65\163", "\x61\154\x6c\x6f\167\123\x61\164\165\162\144\141\x79\x44\145\x6c\x69\166\145\x72\171\106\145\141\164\165\162\145" => "\171\x65\x73", "\141\154\x6c\x6f\167\x48\x6f\154\x64\106\x6f\162\120\151\x63\x6b\x75\160\x46\x65\141\164\x75\162\x65" => "\171\145\x73", "\x61\x6c\x6c\x6f\x77\101\x6c\x63\x6f\x68\x6f\x6c\x46\145\141\x74\x75\162\x65" => "\x79\145\x73", "\x61\x6c\154\x6f\x77\x44\162\x79\x49\x63\145\106\145\141\x74\165\162\x65" => "\171\145\163", "\x61\154\x6c\157\x77\x54\157\x45\x78\x63\x65\145\144\x53\150\151\x70\x70\x69\x6e\x67\124\x6f\164\141\x6c" => "\x79\145\163", "\x72\x65\x71\x75\x69\x72\145\x54\x6f\106\145\164\x63\x68\x53\x68\151\x70\160\x69\x6e\x67\x52\x61\x74\145\x73" => "\171\145\x73", "\x72\x65\161\x75\151\x72\145\x54\x6f\103\162\x65\141\x74\x65\123\x68\151\160\x6d\145\x6e\164" => "\156\x6f", "\162\145\x71\165\151\x72\x65\124\x6f\120\165\162\143\150\141\163\145\120\x6f\163\164\141\x67\145" => "\156\x6f", "\x72\x65\x71\x75\151\x72\x65\124\157\103\157\x6e\x66\151\x72\x6d\123\150\151\160\155\145\x6e\164\x44\x65\164\x61\x69\x6c\x73" => "\x79\x65\x73", "\x70\144\146\101\x75\164\157\120\162\151\156\x74" => "\x6e\x6f", "\160\144\x66\101\165\x74\x6f\120\162\x69\156\x74\104\151\x61\154\x6f\147" => "\x79\x65\163", "\x69\155\160\157\x72\x74\123\x68\151\x70\155\x65\156\164\163\x45\156\141\x62\x6c\145\x64" => "\x79\145\x73", "\151\x6d\x70\157\x72\x74\x53\x68\151\x70\155\145\156\164\163\103\162\157\x6e\124\x61\x73\153\111\156\164\x65\x72\166\141\154" => HOUR_IN_SECONDS, "\x69\155\x70\x6f\162\x74\x53\150\x69\x70\x6d\145\x6e\164\163\x4d\x61\x78\114\x69\x6d\151\x74" => 100, "\x63\x72\x65\141\x74\145\x4f\x72\x64\x65\162\x45\x6e\141\142\154\x65\x64" => "\x6e\157", "\143\162\145\x61\164\x65\117\x72\144\145\162\x43\x72\x6f\x6e\x54\x61\x73\153\111\156\164\x65\162\166\141\154" => HOUR_IN_SECONDS, "\143\x72\x65\x61\x74\145\x4f\162\x64\145\x72\x44\145\154\x61\x79\102\x65\x74\x77\x65\x65\156\101\x74\164\145\155\x70\164\163" => DAY_IN_SECONDS, "\143\162\x65\141\164\145\x4f\x72\x64\145\162\115\141\170\114\x69\x6d\151\x74" => 100, "\x75\x70\x64\141\164\x65\123\x68\151\x70\155\145\x6e\164\163\x45\x6e\141\142\154\x65\x64" => "\171\x65\x73", "\x75\160\x64\x61\x74\x65\x53\150\151\x70\155\x65\x6e\x74\x73\x43\x72\x6f\x6e\x54\x61\x73\153\111\156\164\145\162\x76\x61\154" => HOUR_IN_SECONDS / 2, "\x75\160\x64\x61\164\x65\123\150\151\x70\155\x65\156\164\163\x46\145\164\143\x68\111\156\164\145\x72\x76\x61\154" => HOUR_IN_SECONDS, "\x75\160\x64\x61\x74\x65\123\x68\151\x70\155\145\156\x74\x73\123\164\141\x74\x75\x73\103\x68\141\156\x67\x65\124\151\155\x65\157\165\164" => 10 * DAY_IN_SECONDS, "\165\160\144\141\x74\x65\123\x68\x69\x70\155\145\x6e\164\x73\115\x61\x78\x4c\151\155\151\164" => 100, "\163\150\151\x70\160\151\156\x67\x5a\157\x6e\x65\163" => "\156\157", "\x64\151\163\160\154\x61\171\104\x65\154\151\x76\x65\x72\171\124\151\x6d\145" => "\156\x6f", "\x64\x69\163\x70\x6c\x61\171\x54\162\x61\143\x6b\x69\x6e\147\x54\171\x70\x65" => "\156\157", "\x6d\x65\144\x69\x61\x4d\141\x69\x6c" => "\145\170\143\154\x75\144\145", "\x6e\157\x74\151\x66\171\106\157\162\x53\164\141\x74\x75\163" => [], "\143\x6f\155\x70\x6c\145\x74\145\117\162\x64\145\x72\x46\x6f\162\123\x74\x61\x74\x75\x73\145\163" => [], "\146\145\x74\143\x68\x52\141\164\x65\163\120\x61\x67\145\103\x6f\156\x64\x69\x74\151\x6f\x6e" => "\x61\156\x79", "\x66\145\x74\143\150\x52\141\164\145\163\117\156\x50\x61\x67\145\163" => ["\141\156\x79", "\143\x61\162\x74", "\143\x68\x65\x63\153\157\165\164"], "\x64\x65\x66\x61\165\x6c\164\x43\157\165\156\x74\x72\x79\x4f\x66\117\x72\151\147\x69\x6e" => $UjOaW, "\144\x65\146\141\165\x6c\x74\x53\150\x69\160\x6d\x65\156\164\x44\x65\x73\143\162\x69\160\x74\x69\x6f\x6e" => __("\117\x72\144\145\162\x20\x43\x6f\156\x74\145\x6e\164\163", $this->id), "\165\x70\x64\x61\x74\x65\x53\150\x69\x70\155\145\156\x74\163\106\145\x74\143\150\x49\156\x74\145\x72\166\x61\154" => HOUR_IN_SECONDS, "\165\160\x64\141\164\x65\x53\150\x69\x70\x6d\145\x6e\164\163\x53\164\141\164\x75\163\103\150\x61\x6e\147\145\x54\151\155\145\x6f\x75\164" => 10 * DAY_IN_SECONDS, "\x75\160\x64\x61\x74\145\123\x68\x69\160\155\x65\x6e\164\x73\x4d\x61\170\x4c\151\x6d\x69\164" => 100, "\157\162\151\x67\151\156" => ["\x63\157\x6d\x70\141\156\171" => get_option("\142\x6c\157\147\156\141\x6d\145"), "\x65\x6d\141\x69\154" => get_option("\141\x64\x6d\x69\156\137\145\x6d\x61\151\x6c"), "\x70\x68\x6f\x6e\x65" => "\61\x38\60\x30\70\70\x38\70\x38\70\70", "\141\x64\x64\x72\x65\163\163" => get_option("\x77\x6f\x6f\143\x6f\155\x6d\145\x72\143\x65\137\163\164\x6f\162\145\137\x61\x64\x64\x72\x65\163\163", ''), "\141\x64\144\x72\145\x73\163\x5f\62" => get_option("\167\157\x6f\x63\x6f\x6d\x6d\x65\x72\x63\x65\137\x73\164\x6f\162\x65\x5f\141\x64\144\x72\x65\163\x73\137\62", ''), "\160\157\163\164\x63\157\x64\x65" => get_option("\167\x6f\x6f\x63\157\155\155\145\162\143\x65\x5f\163\x74\157\x72\145\x5f\x70\x6f\163\164\143\x6f\x64\145", ''), "\143\x69\164\171" => get_option("\167\x6f\x6f\143\x6f\155\155\145\x72\x63\x65\137\163\164\157\162\145\x5f\x63\x69\164\171", ''), "\x73\164\141\x74\x65" => $qI6Zy, "\x63\x6f\x75\156\x74\x72\x79" => $UjOaW], "\x77\x65\151\x67\x68\x74\x5f\x75\156\151\x74" => $this->weightUnit, "\x64\x69\x6d\x65\x6e\x73\151\157\156\137\x75\x6e\x69\x74" => $this->dimensionUnit, "\144\x65\146\x61\x75\x6c\164\127\x65\151\x67\x68\164" => round($this->weightConverter->convert(100, $this->weightUnit, "\x67"), 2), "\x64\145\x66\141\165\x6c\x74\x4c\145\x6e\x67\164\150" => round($this->dimensionConverter->convert(100, $this->dimensionUnit, "\155\x6d"), 2), "\144\145\x66\x61\x75\154\x74\127\151\x64\x74\x68" => round($this->dimensionConverter->convert(100, $this->dimensionUnit, "\155\x6d"), 2), "\x64\x65\146\141\x75\x6c\164\110\x65\x69\147\x68\x74" => round($this->dimensionConverter->convert(50, $this->dimensionUnit, "\155\155"), 2)];
}
protected function loadSettings(): void
{
$this->settings = (array)get_option($this->optionKey, []);
unset($this->settings["\x77\145\151\x67\150\164\137\165\x6e\151\164"]);
unset($this->settings["\x64\151\155\x65\156\x73\151\x6f\x6e\x5f\165\x6e\x69\x74"]);
$this->settings = array_merge($this->getDefaultSettings(), $this->settings);
$this->pluginSettings = $this->settings;
$this->syncSettings();
}
protected function syncSettings(): void
{
$this->cache->setUseCache("\171\x65\x73" === $this->settings["\x63\x61\x63\x68\x65"]);
$this->cache->setDefaultExpiresAfter(intval($this->settings["\143\x61\x63\150\145\x45\x78\x70\151\x72\x61\x74\151\x6f\x6e\x49\x6e\123\145\143\163"]));
$this->logger->setEnabled("\171\x65\163" === $this->settings["\144\145\x62\x75\147"]);
$this->parcelPacker->setSettings($this->settings);
if (did_action("\160\x6c\165\147\x69\x6e\x73\x5f\x6c\157\x61\144\x65\144")) {
$this->adapter->init($this->settings)->wait();
}
}
}
Function Calls
None |
Stats
MD5 | 54bb4b77cf75313856cc4df91ef5c5d9 |
Eval Count | 0 |
Decode Time | 76 ms |