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\PackageOrders; use Except..

Decoded Output download

<?php 
declare(strict_types = 1); 
namespace OneTeamSoftware\WC\PackageOrders; 
use Exception; 
use OneTeamSoftware\WC\Logger\Logger; 
use OneTeamSoftware\WP\Admin\OneTeamSoftware; 
use OneTeamSoftware\WP\PluginDependency\PluginDependency; 
use OneTeamSoftware\WP\PluginLife\Client\Client; 
use WC_Coupon; 
use WC_Discounts; 
use WC_Geolocation; 
use WC_Log_Handler_File; 
use WC_Order; 
use WC_Order_Item_Coupon; 
use WC_Order_Item_Fee; 
use WC_Order_Item_Product; 
use WC_Order_Item_Shipping; 
use WC_Order_Item_Tax; 
use WC_Payment_Gateways; 
use WC_Tax; 
use WP_Error; 
class PackageOrders { 
    private $id; 
    private $pluginPath; 
    private $mainMenuId; 
    private $settings; 
    private $orderData; 
    private $templatePath; 
    private $packageTotal; 
    private $packages; 
    private $settingsOptionKey; 
    private $logger; 
    private $pluginLifeClient; 
    private static $availablePaymentGateways = null; 
    public function __construct(string $tnBiO) { 
        $this->id = "wc_package_orders"; 
        $this->pluginPath = $tnBiO; 
        $this->mainMenuId = "oneteamsoftware"; 
        $this->settingsOptionKey = "woocommerce_wc_shipping_packages_settings"; 
        $this->orderData = []; 
        $this->templatePath = dirname($tnBiO) . "/templates/"; 
        $this->packageTotal = 0; 
        $this->packages = []; 
        $this->settings = []; 
        $this->loadSettings(); 
        $this->logger = new Logger($this->id, $this->settings["debug"] === "yes"); 
    } 
    public function register(): 
        void { 
            add_filter("plugin_action_links_" . plugin_basename($this->pluginPath), [$this, "onPluginActionLinks"], 1, 1); 
            $zIqGK = new PluginDependency($this->id, __("Package Orders", $this->id)); 
            $zIqGK->add("woocommerce/woocommerce.php", __("WooCommerce", $this->id), admin_url("/plugin-install.php?tab=plugin-information&plugin=woocommerce&TB_iframe=true&width=600&height=550")); 
            $zIqGK->add("wc-shipping-packages/wc-shipping-packages.php", __("Shipping Packages", $this->id), admin_url("/plugin-install.php?tab=plugin-information&plugin=wc-shipping-packages&TB_iframe=true&width=600&height=550")); 
            $zIqGK->register(); 
            if (!$zIqGK->validate()) { 
                return; 
            } 
            add_filter("wc_shipping_packages_settings", [$this, "onSettings"], 11, 1); 
            add_action("woocommerce_settings_saved", [$this, "onSettingsSaved"]); 
            if (is_admin()) { 
                OneTeamSoftware::instance()->register(); 
                add_action("admin_menu", [$this, "onAdminMenu"]); 
            } 
            if ($this->settings["enablePackageOrders"] !== "yes") { 
                return; 
            } 
            if ($this->settings["enableShipStationIntegration"] === "yes") { 
                $coc7D = "custom_field_2"; 
                if (isset($this->settings["shipStationCustomField"]) && in_array($this->settings["shipStationCustomField"], ["custom_field_2", "custom_field_3"], true)) { 
                    $coc7D = $this->settings["shipStationCustomField"]; 
                } 
                add_filter("woocommerce_shipstation_export_" . $coc7D, [$this, "onShipStationExportCustomField"], 100); 
            } 
            add_action("woocommerce_init", [$this, "onInit"], 100, 1); 
            add_filter("woocommerce_can_reduce_order_stock", [$this, "onCanReduceOrderStock"], 1, 2); 
            add_action("woocommerce_mainorder_status_changed", [$this, "onMainOrderStatusChanged"], 1, 4); 
            add_action("woocommerce_mainorder_payment_status_changed", [$this, "setMainOrderAsCancelled"], 1, 2); 
            add_action("woocommerce_refund_created", [$this, "onMainOrderRefunded"], 1, 2); 
            add_filter("woocommerce_payment_successful_result", [$this, "onPaymentSuccessfulResult"], 100, 2); 
        } 
        public function onPluginActionLinks(array $xsep7): 
            array { 
                $cb1X3 = sprintf("<a href="%s">%s</a>", admin_url("admin.php?page=wc-settings&tab=shipping&section=wc_shipping_packages"), __("Settings", $this->id)); 
                array_unshift($xsep7, $cb1X3); 
                return $xsep7; 
            } 
            public function onAdminMenu(): 
                void { 
                    add_submenu_page($this->mainMenuId, __("Package Orders", $this->id), __("Package Orders", $this->id), "manage_options", "admin.php?page=wc-settings&tab=shipping&section=wc_shipping_packages"); 
                } 
                public function onSettingsSaved(): 
                    void { 
                        $this->loadSettings(); 
                    } 
                    public function onInit(): 
                        void { 
                            (new Hooks\OrderWeight())->register(); 
                            add_action("woocommerce_set_cart_packages", [$this, "onSetCartPackages"], 100, 1); 
                            add_action("woocommerce_payment_complete", [$this, "onPaymentComplete"], 100, 1); 
                            add_filter("woocommerce_order_class", [$this, "onOrderClass"], 10, 3); 
                            add_filter("woocommerce_checkout_update_order_meta", [$this, "onUpdateOrderMeta"], 1, 2); 
                            add_filter("woocommerce_thankyou_order_id", [$this, "onThankYou"], 10, 1); 
                            add_filter("woocommerce_locate_template", [$this, "onLocateTemplate"], 100, 3); 
                        } 
                        public function onSettings(array $E5lgm): 
                            array { 
                                $XaDsN = array_search("method_settings", array_keys($E5lgm), true); 
                                $E5lgm = array_slice($E5lgm, 0, $XaDsN, true) + ["packageOrdersTitle" => ["type" => "title", "title" => __("Package Orders", $this->id), "description" => __("Creates separate order for each of the shipping packages in the cart, so they can be fulfilled independently.", $this->id) ], "packageOrdersLogTitle" => ["type" => "title", "description" => sprintf("<div class="notice notice-info inline"><p>%s <a href="%s" target="_blank">%s</a> %s <strong>%s</strong><br/>%s <strong>%s</strong></p></div>", __("Log can be found in", $this->id), admin_url("admin.php?page=wc-status&tab=logs"), __("WooCommerce -> Status -> Logs", $this->id), __(" with the name"), basename(WC_Log_Handler_File::get_log_file_path($this->id)), __("It can also be found in: ", $this->id), WC_Log_Handler_File::get_log_file_path($this->id)) ], $this->id . "_licenseKey" => ["type" => "text", "title" => __("License Key", $this->id), "default" => '', "description" => __("A valid license key is required for plugin to work", $this->id) ], "enablePackageOrders" => ["type" => "checkbox", "title" => __("Enable Package Orders", $this->id), "description" => __("Create separate order for each Package, so they can be fulfilled independently.", $this->id), "default" => "no"], "noPaymentFor" => ["type" => "multiselect", "class" => "wc-enhanced-select", "title" => __("No Payment For", $this->id), "description" => __("Main order will be split without receiving a payment for these payment methods.", $this->id), "options" => $this->getAvailablePaymentMethods() ], "trashMainOrder" => ["type" => "checkbox", "title" => __("Move Main Order to Trash", $this->id), "default" => "no", "label" => __("Do you want to automatically move Main Order to Trash after payment has been received?", $this->id) ], "customerNote" => ["type" => "textarea", "title" => __("Customer Note", $this->id), "default" => '', "description" => __("The following static customer note will be added to created package orders. It might be useful for various integrations.", $this->id) ], "autoCustomerNote" => ["type" => "checkbox", "title" => __("Auto Customer Note", $this->id), "default" => "no", "description" => __("Automatically add Main Order ID as a customer note. It might be useful for various integrations.", $this->id) ], "orderNoteType" => ["type" => "select", "title" => __("Order Note Type", $this->id), "options" => ['' => __("Private Note", $this->id), "customer" => __("Note to a customer", $this->id) ], "description" => __("Add Main Order ID as either Private or Customer Order Note.", $this->id), "default" => "no"], "shipStationIntegrationTitle" => ["type" => "title", "title" => __("ShipStation Integration", $this->id) ], "enableShipStationIntegration" => ["type" => "checkbox", "title" => sprintf(__("Enable %sShipStation%s Integration", $this->id), "<a href="http://bit.ly/326UAbs" target="_blank">", "</a>"), "description" => sprintf(__("Report package key as a custom field for %sShipStation%s.", $this->id), "<a href="http://bit.ly/326UAbs" target="_blank">", "</a>"), "default" => "no"], "shipStationCustomField" => ["type" => "select", "title" => __("ShipStation Custom Field", $this->id), "options" => ["custom_field_2" => __("Custom Field 2", $this->id), "custom_field_3" => __("Custom Field 3", $this->id) ], "description" => __("You can use Custom Field 2 or Custom Field 3 for integration with ShipStation.", $this->id), "default" => "custom_field_2"]] + array_slice($E5lgm, $XaDsN, count($E5lgm) - $XaDsN, true); 
                                return $E5lgm; 
                            } 
                            public function onShipStationExportCustomField(): 
                                string { 
                                    return "_package_key"; 
                                } 
                                public function onSetCartPackages(array $sFlVt): 
                                    void { 
                                        $this->logger->debug(__FILE__, 386, "onSetCartPackages: " . count($sFlVt)); 
                                        if ($this->settings["shippingMethodPer"] === "cart" && !empty($sFlVt[0]["rates"])) { 
                                            $this->logger->debug(__FILE__, 389, "Shipping method selection is set to per cart, so we will use rates from the first package for other packages"); 
                                            $Vb7yL = WC()->session->get("chosen_shipping_methods"); 
                                            $j4QTc = $Vb7yL[0]; 
                                            $IGh16 = []; 
                                            foreach ($sFlVt[0]["rates"] as $tkufx => $OCgEe) { 
                                                $OCgEe = clone $OCgEe; 
                                                $OCgEe->cost = 0; 
                                                $OCgEe->taxes = []; 
                                                $IGh16[$tkufx] = $OCgEe; 
                                                zaYOH: 
                                                } 
                                                O6ESy: 
                                                    foreach ($sFlVt as $hb6ZD => $rWFN3) { 
                                                        if (empty($rWFN3["rates"]) && $rWFN3["needs_shipping"]) { 
                                                            $rWFN3["rates"] = $IGh16; 
                                                            $sFlVt[$hb6ZD] = $rWFN3; 
                                                            $Vb7yL[$hb6ZD] = $j4QTc; 
                                                        } 
                                                        ez3du: 
                                                        } 
                                                        dcCSp: 
                                                            WC()->session->set("chosen_shipping_methods", $Vb7yL); 
                                                            $this->logger->debug(__FILE__, 415, "New Chosen Shipping Methods: " . print_r($Vb7yL, true)); 
                                                        } 
                                                        $this->packages = $sFlVt; 
                                                    } 
                                                    public function onOrderClass(string $C9Es2, string $Vafde, int $Ao9xj): 
                                                        string { 
                                                            if ($Vafde !== "shop_order") { 
                                                                return $C9Es2; 
                                                            } 
                                                            if (!$this->isMainOrder($Ao9xj)) { 
                                                                return $C9Es2; 
                                                            } 
                                                            $this->logger->debug(__FILE__, 441, "onOrderClass: {$Ao9xj}"); 
                                                            return __NAMESPACE__ . "\MainOrder"; 
                                                        } 
                                                        public function onCanReduceOrderStock(bool $ejZZf, $BP_Lq): 
                                                            bool { 
                                                                $this->logger->debug(__FILE__, 455, "onCanReduceOrderStock"); 
                                                                if (is_int($BP_Lq)) { 
                                                                    $BP_Lq = wc_get_order($BP_Lq); 
                                                                } 
                                                                if ($this->isMainOrder($BP_Lq->get_id())) { 
                                                                    return false; 
                                                                } 
                                                                $this->logger->debug(__FILE__, 465, "This is not the main order, so skip it"); 
                                                                return $ejZZf; 
                                                            } 
                                                            public function onMainOrderStatusChanged(int $Ao9xj, string $Vxp02, string $N_hkN, WC_Order $BP_Lq): 
                                                                void { 
                                                                    $this->logger->debug(__FILE__, 481, "onMainOrderStatusChanged"); 
                                                                    if ($N_hkN === "cancelled") { 
                                                                        $this->logger->debug(__FILE__, 484, "Skip cancelled status"); 
                                                                        return; 
                                                                    } 
                                                                    $mpfHi = $this->getPackageOrders($Ao9xj); 
                                                                    foreach ($mpfHi as $xFrjX) { 
                                                                        $xFrjX->set_status($N_hkN); 
                                                                        $xFrjX->save(); 
                                                                        RYgw0: 
                                                                        } 
                                                                        xsJq8: 
                                                                        } 
                                                                        public function onPaymentSuccessfulResult(array $bhH8x, int $Ao9xj): 
                                                                            array { 
                                                                                $BP_Lq = wc_get_order($Ao9xj); 
                                                                                $LI1Ee = $BP_Lq->get_payment_method(); 
                                                                                if (is_object($BP_Lq) && $LI1Ee == "invoice") { 
                                                                                    $this->logger->debug(__FILE__, 514, "Payment method ID: {$LI1Ee} was used, so we can cancell order ID: {$Ao9xj}"); 
                                                                                    $this->setMainOrderAsCancelled($Ao9xj, $BP_Lq); 
                                                                                } 
                                                                                return $bhH8x; 
                                                                            } 
                                                                            public function setMainOrderAsCancelled(int $Ao9xj, WC_Order $BP_Lq): 
                                                                                void { 
                                                                                    $this->logger->debug(__FILE__, 530, "setMainOrderAsCancelled"); 
                                                                                    if (empty($BP_Lq) || $BP_Lq->get_status() === "cancelled") { 
                                                                                        $this->logger->debug(__FILE__, 533, "Order does not exist or cancelled, so skip it"); 
                                                                                        return; 
                                                                                    } 
                                                                                    $BP_Lq->update_status("cancelled"); 
                                                                                    $BP_Lq->save(); 
                                                                                    $n2Rul = get_post_meta($Ao9xj, "_package_order_ids", true); 
                                                                                    if ($this->settings["trashMainOrder"] === "yes" && !empty($n2Rul)) { 
                                                                                        wp_trash_post($Ao9xj); 
                                                                                    } 
                                                                                } 
                                                                                public function onMainOrderRefunded(int $zegrr, array $aYSBD): 
                                                                                    void { 
                                                                                        if (empty($_POST["restock_refunded_items"]) || $_POST["restock_refunded_items"] !== "true") { 
                                                                                            return; 
                                                                                        } 
                                                                                        if (empty($aYSBD["order_id"]) || empty($aYSBD["line_items"])) { 
                                                                                            return; 
                                                                                        } 
                                                                                        $Ao9xj = $aYSBD["order_id"]; 
                                                                                        $BP_Lq = wc_get_order($Ao9xj); 
                                                                                        if (empty($BP_Lq)) { 
                                                                                            return; 
                                                                                        } 
                                                                                        if (!$this->isMainOrder($Ao9xj)) { 
                                                                                            return; 
                                                                                        } 
                                                                                        $BP_Lq->add_order_note("Main Order has been refunded", false); 
                                                                                        $pGK51 = $BP_Lq->get_items(["line_item"]); 
                                                                                        $B341z = $aYSBD["line_items"]; 
                                                                                        foreach ($B341z as $xSCeE => $u86c2) { 
                                                                                            if (isset($pGK51[$xSCeE])) { 
                                                                                                $tWWaC = $pGK51[$xSCeE]; 
                                                                                                $zP4f2 = $BP_Lq->get_product_from_item($tWWaC); 
                                                                                                if (!empty($zP4f2) && $zP4f2->exists() && $zP4f2->managing_stock()) { 
                                                                                                    $ROtct = wc_stock_amount($zP4f2->stock); 
                                                                                                    $huLMS = $zP4f2->increase_stock($u86c2["qty"]); 
                                                                                                    $BP_Lq->add_order_note(sprintf(__("Item #%s stock increased from %s to %s.", "woocommerce"), $zP4f2->get_id(), $ROtct, $huLMS)); 
                                                                                                } 
                                                                                            } 
                                                                                            A2D7H: 
                                                                                            } 
                                                                                            sme2d: 
                                                                                            } 
                                                                                            public function onLocateTemplate(string $X5mGG, string $ror5t, string $P1O1q): 
                                                                                                string { 
                                                                                                    switch ($ror5t) { 
                                                                                                        case "checkout/thankyou.php": 
                                                                                                        case "order/order-details.php": 
                                                                                                        case "order/package-order-details.php": 
                                                                                                        case "myaccount/orders.php": 
                                                                                                            $X5mGG = $this->templatePath . $ror5t; 
                                                                                                            $this->logger->debug(__FILE__, 619, "Overwrite template path to: " . $X5mGG); 
                                                                                                            gotow6TB4; 
                                                                                                    } 
                                                                                                    mHexU: 
                                                                                                        w6TB4: 
                                                                                                            return $X5mGG; 
                                                                                                        } 
                                                                                                        public function onThankYou(int $Ao9xj): 
                                                                                                            int { 
                                                                                                                $this->logger->debug(__FILE__, 634, "onThankYou: {$Ao9xj}"); 
                                                                                                                if (empty($Ao9xj)) { 
                                                                                                                    return $Ao9xj; 
                                                                                                                } 
                                                                                                                $mpfHi = $this->getPackageOrders($Ao9xj); 
                                                                                                                foreach ($mpfHi as $xFrjX) { 
                                                                                                                    $xFrjX->set_customer_ip_address(WC_Geolocation::get_ip_address()); 
                                                                                                                    $xFrjX->save(); 
                                                                                                                    XAmQM: 
                                                                                                                    } 
                                                                                                                    NZUUy: 
                                                                                                                        return $Ao9xj; 
                                                                                                                    } 
                                                                                                                    public function onPaymentComplete(int $Ao9xj): 
                                                                                                                        void { 
                                                                                                                            $this->logger->debug(__FILE__, 659, "onPaymentComplete: {$Ao9xj}"); 
                                                                                                                            $BP_Lq = wc_get_order($Ao9xj); 
                                                                                                                            if (empty($BP_Lq)) { 
                                                                                                                                $this->logger->debug(__FILE__, 663, "Order can't be found, so skip it"); 
                                                                                                                                return; 
                                                                                                                            } 
                                                                                                                            $mpfHi = $this->getPackageOrders($Ao9xj); 
                                                                                                                            if (empty($mpfHi)) { 
                                                                                                                                $this->logger->debug(__FILE__, 670, "This is not the main order, so skip it"); 
                                                                                                                                return; 
                                                                                                                            } 
                                                                                                                            $bZkgM = $BP_Lq->get_transaction_id(); 
                                                                                                                            $Wl8jQ = get_post_meta($Ao9xj, "_needs_payment", true); 
                                                                                                                            $this->logger->debug(__FILE__, 678, "Payment transaction id: {$bZkgM}, needsPayment: {$Wl8jQ}"); 
                                                                                                                            if ($Wl8jQ && empty($bZkgM)) { 
                                                                                                                                $this->logger->debug(__FILE__, 682, "We are still awaiting for the payment"); 
                                                                                                                                return; 
                                                                                                                            } 
                                                                                                                            if (!empty($bZkgM)) { 
                                                                                                                                $BP_Lq->add_order_note(sprintf(__("Payment Transaction ID: %s", "woocommerce"), $bZkgM), false); 
                                                                                                                            } 
                                                                                                                            $VqCkg = $BP_Lq->get_meta("_stripe_charge_captured", true); 
                                                                                                                            foreach ($mpfHi as $xFrjX) { 
                                                                                                                                $this->logger->debug(__FILE__, 696, "trigger payment_complete on order: " . $xFrjX->get_id() . " with transaction id: {$bZkgM}"); 
                                                                                                                                if ($VqCkg === "yes") { 
                                                                                                                                    update_post_meta($xFrjX->get_id(), "_stripe_charge_captured", $VqCkg); 
                                                                                                                                } 
                                                                                                                                $xFrjX->payment_complete($bZkgM); 
                                                                                                                                if (!empty($bZkgM)) { 
                                                                                                                                    update_post_meta($xFrjX->get_id(), "_transaction_id", $bZkgM); 
                                                                                                                                    $xFrjX->add_order_note(sprintf(__("Payment Transaction ID: %s", "woocommerce"), $bZkgM), false); 
                                                                                                                                } 
                                                                                                                                ERgB8: 
                                                                                                                                } 
                                                                                                                                oZNcD: 
                                                                                                                                    $this->setMainOrderAsCancelled($Ao9xj, $BP_Lq); 
                                                                                                                                } 
                                                                                                                                public function onUpdateOrderMeta(int $Ao9xj, array $HaonC): 
                                                                                                                                    void { 
                                                                                                                                        $this->logger->debug(__FILE__, 723, "onUpdateOrderMeta, orderId: %d", $Ao9xj); 
                                                                                                                                        if (empty($Ao9xj)) { 
                                                                                                                                            $this->logger->debug(__FILE__, 725, "Order ID is empty, so we can't continue"); 
                                                                                                                                            return; 
                                                                                                                                        } 
                                                                                                                                        $this->orderData = $this->getOrderData($HaonC); 
                                                                                                                                        if (empty($this->orderData)) { 
                                                                                                                                            $this->logger->debug(__FILE__, 732, "No order data have been found, so we can't continue"); 
                                                                                                                                            return; 
                                                                                                                                        } 
                                                                                                                                        if (count($this->orderData["packages"]) === 1) { 
                                                                                                                                            $rWFN3 = reset($this->orderData["packages"]); 
                                                                                                                                            $this->logger->debug(__FILE__, 742, "This order has only one package, so just add package key to meta: " . $rWFN3["packageKey"]); 
                                                                                                                                            update_post_meta($Ao9xj, "_package_key", $rWFN3["packageKey"], true); 
                                                                                                                                            return; 
                                                                                                                                        } 
                                                                                                                                        $mpfHi = $this->getPackageOrders($Ao9xj); 
                                                                                                                                        if (empty($mpfHi)) { 
                                                                                                                                            $mpfHi = $this->createPackageOrders($Ao9xj); 
                                                                                                                                        } 
                                                                                                                                        if (empty($mpfHi)) { 
                                                                                                                                            $this->logger->debug(__FILE__, 755, "Unable to create package orders"); 
                                                                                                                                        } 
                                                                                                                                    } 
                                                                                                                                    private function loadSettings(): 
                                                                                                                                        void { 
                                                                                                                                            $this->settings = get_option($this->settingsOptionKey, []); 
                                                                                                                                            $this->settings = array_replace_recursive(["shippingMethodPer" => "package", "enablePackageOrders" => "no", "debug" => "no", "trashMainOrder" => "no", "noPaymentFor" => [], "customerNote" => '', "autoCustomerNote" => "no", "orderNoteType" => '', "enableShipStationIntegration" => "no", "shipStationCustomField" => "custom_field_2", $this->id . "_licenseKey" => ''], $this->settings); 
                                                                                                                                        } 
                                                                                                                                        private function getOrderData(array $HaonC): 
                                                                                                                                            array { 
                                                                                                                                                $this->logger->debug(__FILE__, 790, "getOrderData"); 
                                                                                                                                                $sFlVt = $this->packages; 
                                                                                                                                                if (empty($sFlVt)) { 
                                                                                                                                                    $sFlVt = WC()->shipping->get_packages(); 
                                                                                                                                                } 
                                                                                                                                                if (empty($sFlVt)) { 
                                                                                                                                                    $this->logger->debug(__FILE__, 798, "Cart does not have any packages"); 
                                                                                                                                                    return []; 
                                                                                                                                                } 
                                                                                                                                                foreach ($sFlVt as $hb6ZD => $rWFN3) { 
                                                                                                                                                    $rWFN3["packageIdx"] = $hb6ZD; 
                                                                                                                                                    $sFlVt[$hb6ZD] = $rWFN3; 
                                                                                                                                                    Q22kf: 
                                                                                                                                                    } 
                                                                                                                                                    CvtRu: 
                                                                                                                                                        $kOnUr = ["packages" => $sFlVt, "customer_id" => apply_filters("woocommerce_checkout_customer_id", get_current_user_id()), "currency" => get_woocommerce_currency(), "prices_include_tax" => "yes" === get_option("woocommerce_prices_include_tax"), "ip_address" => WC_Geolocation::get_ip_address(), "user_agent" => wc_get_user_agent(), "posted" => $HaonC, "address" => ["billing" => $this->getOrderAddress("billing", $HaonC), "shipping" => $this->getOrderAddress("shipping", $HaonC) ], "cart_hash" => md5(json_encode(wc_clean(WC()->cart->get_cart_for_session())) . WC()->cart->total), "chosen_shipping_methods" => WC()->session->get("chosen_shipping_methods"), "needs_payment" => WC()->cart->needs_payment(), "available_payment_gateways" => WC()->payment_gateways->get_available_payment_gateways(), "fees" => WC()->cart->get_fees(), "subtotal" => $this->getItemsSubTotal(WC()->cart->get_cart()), "calculate_tax" => wc_tax_enabled() && !WC()->cart->get_customer()->get_is_vat_exempt(), "customer" => WC()->customer, "prices_include_tax" => wc_prices_include_tax() ]; 
                                                                                                                                                        return $kOnUr; 
                                                                                                                                                    } 
                                                                                                                                                    private function getOrderAddress(string $jm5KG, array $HaonC): 
                                                                                                                                                        array { 
                                                                                                                                                            if (!in_array($jm5KG, ["shipping", "billing"], true)) { 
                                                                                                                                                                return false; 
                                                                                                                                                            } 
                                                                                                                                                            $iP6CN = ["first_name", "last_name", "company", "address_1", "address_2", "city", "state", "postcode", "country", "email", "phone"]; 
                                                                                                                                                            $JrnTm = []; 
                                                                                                                                                            foreach ($iP6CN as $q8NDm) { 
                                                                                                                                                                $tkufx = $jm5KG . "_" . $q8NDm; 
                                                                                                                                                                if (isset($HaonC[$tkufx])) { 
                                                                                                                                                                    $JrnTm[$q8NDm] = wc_clean($HaonC[$tkufx]); 
                                                                                                                                                                } else { 
                                                                                                                                                                    $JrnTm[$q8NDm] = ''; 
                                                                                                                                                                } 
                                                                                                                                                                RD1nL: 
                                                                                                                                                                } 
                                                                                                                                                                kHFIh: 
                                                                                                                                                                    return $JrnTm; 
                                                                                                                                                                } 
                                                                                                                                                                private function setPackageAddress(WC_Order $BP_Lq): 
                                                                                                                                                                    void { 
                                                                                                                                                                        $this->logger->debug(__FILE__, 884, "setPackageAddress " . print_r($this->orderData["address"], true)); 
                                                                                                                                                                        $BP_Lq->set_address($this->orderData["address"]["billing"], "billing"); 
                                                                                                                                                                        $BP_Lq->set_address($this->orderData["address"]["shipping"], "shipping"); 
                                                                                                                                                                    } 
                                                                                                                                                                    private function getItemsSubTotal(array $pZuRI): 
                                                                                                                                                                        float { 
                                                                                                                                                                            if (empty($pZuRI)) { 
                                                                                                                                                                                return 0; 
                                                                                                                                                                            } 
                                                                                                                                                                            $m5X9p = 0; 
                                                                                                                                                                            foreach ($pZuRI as $t9Fuv) { 
                                                                                                                                                                                $m5X9p+= $t9Fuv["line_subtotal"]; 
                                                                                                                                                                                s_DQa: 
                                                                                                                                                                                } 
                                                                                                                                                                                aU0Ar: 
                                                                                                                                                                                    return $m5X9p; 
                                                                                                                                                                                } 
                                                                                                                                                                                private function addPackageFees(WC_Order $BP_Lq, array $rWFN3): 
                                                                                                                                                                                    void { 
                                                                                                                                                                                        $this->logger->debug(__FILE__, 920, "addPackageFees"); 
                                                                                                                                                                                        $TJOZY = $this->orderData["subtotal"]; 
                                                                                                                                                                                        $wDBY0 = $this->getItemsSubTotal($rWFN3["contents"]); 
                                                                                                                                                                                        $this->logger->debug(__FILE__, 925, "Cart Total: {$TJOZY} | Package SubTotal: {$wDBY0}"); 
                                                                                                                                                                                        $oKFSY = $wDBY0 / $TJOZY; 
                                                                                                                                                                                        foreach ($this->orderData["fees"] as $dxIZj => $M9svJ) { 
                                                                                                                                                                                            $this->logger->debug(__FILE__, 930, "Order Fees: " . print_r($M9svJ, true)); 
                                                                                                                                                                                            $M9svJ = clone $M9svJ; 
                                                                                                                                                                                            $M9svJ->amount*= $oKFSY; 
                                                                                                                                                                                            $M9svJ->total*= $oKFSY; 
                                                                                                                                                                                            $M9svJ->tax*= $oKFSY; 
                                                                                                                                                                                            foreach ($M9svJ->tax_data as $tH2rt => $vmx_V) { 
                                                                                                                                                                                                $M9svJ->tax_data[$tH2rt] = $vmx_V * $oKFSY; 
                                                                                                                                                                                                SUwTu: 
                                                                                                                                                                                                } 
                                                                                                                                                                                                iJu1M: 
                                                                                                                                                                                                    $this->logger->debug(__FILE__, 943, "Package Fees: " . print_r($M9svJ, true)); 
                                                                                                                                                                                                    $t9Fuv = new WC_Order_Item_Fee(); 
                                                                                                                                                                                                    $t9Fuv->legacy_fee = $M9svJ; 
                                                                                                                                                                                                    $t9Fuv->legacy_fee_key = $dxIZj; 
                                                                                                                                                                                                    $t9Fuv->set_props(["name" => $M9svJ->name, "tax_class" => $M9svJ->taxable ? $M9svJ->tax_class : 0, "amount" => $M9svJ->amount, "total" => $M9svJ->total, "total_tax" => $M9svJ->tax, "taxes" => ["total" => $M9svJ->tax_data]]); 
                                                                                                                                                                                                    do_action("woocommerce_checkout_create_order_fee_item", $t9Fuv, $dxIZj, $M9svJ, $BP_Lq); 
                                                                                                                                                                                                    $BP_Lq->add_item($t9Fuv); 
                                                                                                                                                                                                    $this->logger->debug(__FILE__, 966, "Fee total: " . $M9svJ->total . ", tax: " . $M9svJ->tax); 
                                                                                                                                                                                                    $this->packageTotal+= $M9svJ->total + $M9svJ->tax; 
                                                                                                                                                                                                    VHEHa: 
                                                                                                                                                                                                    } 
                                                                                                                                                                                                    mVneH: 
                                                                                                                                                                                                    } 
                                                                                                                                                                                                    private function addPackageTaxes(WC_Order $BP_Lq, array $rWFN3): 
                                                                                                                                                                                                        void { 
                                                                                                                                                                                                            $this->logger->debug(__FILE__, 982, "addPackageTaxes"); 
                                                                                                                                                                                                            $clBIT = $this->getPackageTaxes($rWFN3); 
                                                                                                                                                                                                            $this->logger->debug(__FILE__, 986, "Package taxes: " . print_r($clBIT, true)); 
                                                                                                                                                                                                            $VtWGi = 0; 
                                                                                                                                                                                                            $mz6z3 = 0; 
                                                                                                                                                                                                            foreach ($clBIT as $JdtyU) { 
                                                                                                                                                                                                                $VtWGi+= $JdtyU["tax_total"]; 
                                                                                                                                                                                                                $mz6z3+= $JdtyU["shipping_tax_total"]; 
                                                                                                                                                                                                                $t9Fuv = new WC_Order_Item_Tax(); 
                                                                                                                                                                                                                $t9Fuv->set_props($JdtyU); 
                                                                                                                                                                                                                do_action("woocommerce_checkout_create_order_tax_item", $t9Fuv, $JdtyU["rate_id"], $BP_Lq); 
                                                                                                                                                                                                                $BP_Lq->add_item($t9Fuv); 
                                                                                                                                                                                                                dEbQZ: 
                                                                                                                                                                                                                } 
                                                                                                                                                                                                                pzo3b: 
                                                                                                                                                                                                                    $this->logger->debug(__FILE__, 1004, "Cart tax: {$VtWGi}, shipping tax: {$mz6z3}"); 
                                                                                                                                                                                                                    $BP_Lq->set_cart_tax($VtWGi); 
                                                                                                                                                                                                                    $BP_Lq->set_shipping_tax($mz6z3); 
                                                                                                                                                                                                                } 
                                                                                                                                                                                                                private function getPackageTaxes(array $rWFN3): 
                                                                                                                                                                                                                    array { 
                                                                                                                                                                                                                        if (empty($rWFN3)) { 
                                                                                                                                                                                                                            return []; 
                                                                                                                                                                                                                        } 
                                                                                                                                                                                                                        $clBIT = []; 
                                                                                                                                                                                                                        $pZuRI = $rWFN3["contents"]; 
                                                                                                                                                                                                                        foreach ($pZuRI as $t9Fuv) { 
                                                                                                                                                                                                                            if (!empty($t9Fuv["line_tax_data"]) && isset($t9Fuv["line_tax_data"]["total"])) { 
                                                                                                                                                                                                                                $oosa6 = $t9Fuv["line_tax_data"]["total"]; 
                                                                                                                                                                                                                                foreach ($oosa6 as $em2iD => $m5X9p) { 
                                                                                                                                                                                                                                    if (empty($clBIT[$em2iD])) { 
                                                                                                                                                                                                                                        $clBIT[$em2iD] = ["rate_id" => $em2iD, "tax_total" => wc_round_tax_total($m5X9p), "shipping_tax_total" => 0, "rate_code" => WC_Tax::get_rate_code($em2iD), "label" => WC_Tax::get_rate_label($em2iD), "compound" => WC_Tax::is_compound($em2iD) ]; 
                                                                                                                                                                                                                                    } else { 
                                                                                                                                                                                                                                        $clBIT[$em2iD]["tax_total"] = wc_round_tax_total($clBIT[$em2iD]["tax_total"] + $m5X9p); 
                                                                                                                                                                                                                                    } 
                                                                                                                                                                                                                                    XmpRh: 
                                                                                                                                                                                                                                    } 
                                                                                                                                                                                                                                    ZgM4S: 
                                                                                                                                                                                                                                    } 
                                                                                                                                                                                                                                    OtgMZ: 
                                                                                                                                                                                                                                    } 
                                                                                                                                                                                                                                    rV3jT: 
                                                                                                                                                                                                                                        $hb6ZD = $rWFN3["packageIdx"]; 
                                                                                                                                                                                                                                        $QAlf1 = $this->orderData["chosen_shipping_methods"]; 
                                                                                                                                                                                                                                        $GzGLG = isset($QAlf1[$hb6ZD]) ? $rWFN3["rates"][$QAlf1[$hb6ZD]] : null; 
                                                                                                                                                                                                                                        if (isset($GzGLG) && !empty($GzGLG->taxes)) { 
                                                                                                                                                                                                                                            $this->logger->debug(__FILE__, 1053, "Shipping taxes: " . print_r($GzGLG->taxes, true)); 
                                                                                                                                                                                                                                            foreach ($GzGLG->taxes as $em2iD => $m5X9p) { 
                                                                                                                                                                                                                                                if (empty($clBIT[$em2iD])) { 
                                                                                                                                                                                                                                                    $clBIT[$em2iD] = ["rate_id" => $em2iD, "tax_total" => 0, "shipping_tax_total" => wc_round_tax_total($m5X9p), "rate_code" => WC_Tax::get_rate_code($em2iD), "label" => WC_Tax::get_rate_label($em2iD), "compound" => WC_Tax::is_compound($em2iD) ]; 
                                                                                                                                                                                                                                                } else { 
                                                                                                                                                                                                                                                    $clBIT[$em2iD]["shipping_tax_total"] = wc_round_tax_total($clBIT[$em2iD]["shipping_tax_total"] + $m5X9p); 
                                                                                                                                                                                                                                                } 
                                                                                                                                                                                                                                                Az2GC: 
                                                                                                                                                                                                                                                } 
                                                                                                                                                                                                                                                Ugwd1: 
                                                                                                                                                                                                                                                } 
                                                                                                                                                                                                                                                $TJOZY = $this->orderData["subtotal"]; 
                                                                                                                                                                                                                                                $wDBY0 = $this->getItemsSubTotal($rWFN3["contents"]); 
                                                                                                                                                                                                                                                $oKFSY = $wDBY0 / $TJOZY; 
                                                                                                                                                                                                                                                foreach ($this->orderData["fees"] as $M9svJ) { 
                                                                                                                                                                                                                                                    $M9svJ = clone $M9svJ; 
                                                                                                                                                                                                                                                    $M9svJ->tax*= $oKFSY; 
                                                                                                                                                                                                                                                    foreach ($M9svJ->tax_data as $em2iD => $vmx_V) { 
                                                                                                                                                                                                                                                        $GcoSc = $vmx_V * $oKFSY; 
                                                                                                                                                                                                                                                        if (empty($clBIT[$em2iD])) { 
                                                                                                                                                                                                                                                            $clBIT[$em2iD] = ["rate_id" => $em2iD, "tax_total" => $GcoSc, "shipping_tax_total" => 0, "rate_code" => WC_Tax::get_rate_code($em2iD), "label" => WC_Tax::get_rate_label($em2iD), "compound" => WC_Tax::is_compound($em2iD) ]; 
                                                                                                                                                                                                                                                        } else { 
                                                                                                                                                                                                                                                            $clBIT[$em2iD]["tax_total"] = wc_round_tax_total($clBIT[$em2iD]["tax_total"] + $GcoSc); 
                                                                                                                                                                                                                                                        } 
                                                                                                                                                                                                                                                        nKB8x: 
                                                                                                                                                                                                                                                        } 
                                                                                                                                                                                                                                                        CnIDF: 
                                                                                                                                                                                                                                                            DUp8M: 
                                                                                                                                                                                                                                                            } 
                                                                                                                                                                                                                                                            vsk1w: 
                                                                                                                                                                                                                                                                return $clBIT; 
                                                                                                                                                                                                                                                            } 
                                                                                                                                                                                                                                                            private function addPackageItems(WC_Order $BP_Lq, array $rWFN3): 
                                                                                                                                                                                                                                                                void { 
                                                                                                                                                                                                                                                                    $this->logger->debug(__FILE__, 1114, "addPackageItems"); 
                                                                                                                                                                                                                                                                    $KCTNg = $rWFN3["contents"]; 
                                                                                                                                                                                                                                                                    foreach ($KCTNg as $afSkb => $P6uQS) { 
                                                                                                                                                                                                                                                                        $this->addPackageItem($BP_Lq, $afSkb, $P6uQS); 
                                                                                                                                                                                                                                                                        bCTIc: 
                                                                                                                                                                                                                                                                        } 
                                                                                                                                                                                                                                                                        Ago9m: 
                                                                                                                                                                                                                                                                        } 
                                                                                                                                                                                                                                                                        private function addPackageItem(WC_Order $BP_Lq, string $afSkb, array $P6uQS): 
                                                                                                                                                                                                                                                                            void { 
                                                                                                                                                                                                                                                                                $t9Fuv = apply_filters("woocommerce_checkout_create_order_line_item_object", new WC_Order_Item_Product(), $afSkb, $P6uQS, $BP_Lq); 
                                                                                                                                                                                                                                                                                $zP4f2 = $P6uQS["data"]; 
                                                                                                                                                                                                                                                                                $t9Fuv->legacy_values = $P6uQS; 
                                                                                                                                                                                                                                                                                $t9Fuv->legacy_cart_itemKey = $afSkb; 
                                                                                                                                                                                                                                                                                $t9Fuv->set_props(["quantity" => $P6uQS["quantity"], "variation" => $P6uQS["variation"], "subtotal" => $P6uQS["line_subtotal"], "total" => $P6uQS["line_total"], "subtotal_tax" => $P6uQS["line_subtotal_tax"], "total_tax" => $P6uQS["line_tax"], "taxes" => $P6uQS["line_tax_data"]]); 
                                                                                                                                                                                                                                                                                if ($zP4f2) { 
                                                                                                                                                                                                                                                                                    $t9Fuv->set_props(["name" => $zP4f2->get_name(), "tax_class" => $zP4f2->get_tax_class(), "product_id" => $zP4f2->is_type("variation") ? $zP4f2->get_parent_id() : $zP4f2->get_id(), "variation_id" => $zP4f2->is_type("variation") ? $zP4f2->get_id() : 0]); 
                                                                                                                                                                                                                                                                                } 
                                                                                                                                                                                                                                                                                $t9Fuv->set_backorder_meta(); 
                                                                                                                                                                                                                                                                                do_action("woocommerce_checkout_create_order_line_item", $t9Fuv, $afSkb, $P6uQS, $BP_Lq); 
                                                                                                                                                                                                                                                                                $BP_Lq->add_item($t9Fuv); 
                                                                                                                                                                                                                                                                                $this->logger->debug(__FILE__, 1175, "Package item subtotal: " . $P6uQS["line_subtotal"] . ", total: " . $P6uQS["line_total"] . ", tax: " . $P6uQS["line_tax"]); 
                                                                                                                                                                                                                                                                                $this->packageTotal+= $P6uQS["line_total"] + $P6uQS["line_tax"]; 
                                                                                                                                                                                                                                                                            } 
                                                                                                                                                                                                                                                                            private function setPackagePaymentMethod(WC_Order $BP_Lq): 
                                                                                                                                                                                                                                                                                void { 
                                                                                                                                                                                                                                                                                    $this->logger->debug(__FILE__, 1188, "setPackagePaymentMethod"); 
                                                                                                                                                                                                                                                                                    $LI1Ee = ''; 
                                                                                                                                                                                                                                                                                    if ($this->orderData["needs_payment"]) { 
                                                                                                                                                                                                                                                                                        $LGQHA = $this->orderData["available_payment_gateways"]; 
                                                                                                                                                                                                                                                                                        $KPEZ3 = $this->orderData["posted"]["payment_method"]; 
                                                                                                                                                                                                                                                                                        $this->logger->debug(__FILE__, 1197, "Payment method ID: {$KPEZ3}"); 
                                                                                                                                                                                                                                                                                        if (isset($LGQHA[$KPEZ3])) { 
                                                                                                                                                                                                                                                                                            $LI1Ee = $LGQHA[$KPEZ3]; 
                                                                                                                                                                                                                                                                                            $LI1Ee->validate_fields(); 
                                                                                                                                                                                                                                                                                        } else { 
                                                                                                                                                                                                                                                                                            $this->logger->debug(__FILE__, 1203, "Invalid payment method"); 
                                                                                                                                                                                                                                                                                        } 
                                                                                                                                                                                                                                                                                    } 
                                                                                                                                                                                                                                                                                    $BP_Lq->set_payment_method($LI1Ee); 
                                                                                                                                                                                                                                                                                } 
                                                                                                                                                                                                                                                                                private function addPackageShippingRate(WC_Order $BP_Lq, array $rWFN3): 
                                                                                                                                                                                                                                                                                    void { 
                                                                                                                                                                                                                                                                                        $this->logger->debug(__FILE__, 1220, "addPackageShippingRate"); 
                                                                                                                                                                                                                                                                                        $hb6ZD = $rWFN3["packageIdx"]; 
                                                                                                                                                                                                                                                                                        $QAlf1 = $this->orderData["chosen_shipping_methods"]; 
                                                                                                                                                                                                                                                                                        $this->logger->debug(__FILE__, 1225, "Shipping Methods: " . print_r($QAlf1, true)); 
                                                                                                                                                                                                                                                                                        $this->logger->debug(__FILE__, 1226, "Package index: " . $hb6ZD); 
                                                                                                                                                                                                                                                                                        if (!isset($QAlf1[$hb6ZD])) { 
                                                                                                                                                                                                                                                                                            $this->logger->debug(__FILE__, 1229, "Shipping method is not set"); 
                                                                                                                                                                                                                                                                                            return; 
                                                                                                                                                                                                                                                                                        } 
                                                                                                                                                                                                                                                                                        if (empty($rWFN3["rates"][$QAlf1[$hb6ZD]])) { 
                                                                                                                                                                                                                                                                                            $this->logger->debug(__FILE__, 1235, "Selected rate is not set"); 
                                                                                                                                                                                                                                                                                            return; 
                                                                                                                                                                                                                                                                                        } 
                                                                                                                                                                                                                                                                                        $GzGLG = $rWFN3["rates"][$QAlf1[$hb6ZD]]; 
                                                                                                                                                                                                                                                                                        $this->logger->debug(__FILE__, 1242, "Shipping rate: " . print_r($GzGLG, true)); 
                                                                                                                                                                                                                                                                                        $t9Fuv = new WC_Order_Item_Shipping(); 
                                                                                                                                                                                                                                                                                        $t9Fuv->legacy_package_key = $hb6ZD; 
                                                                                                                                                                                                                                                                                        $t9Fuv->set_props(["method_title" => $GzGLG->label, "method_id" => $GzGLG->method_id, "instance_id" => $GzGLG->instance_id, "total" => wc_format_decimal($GzGLG->cost), "taxes" => ["total" => $GzGLG->taxes]]); 
                                                                                                                                                                                                                                                                                        foreach ($GzGLG->get_meta_data() as $tkufx => $Vq5tP) { 
                                                                                                                                                                                                                                                                                            $t9Fuv->add_meta_data($tkufx, $Vq5tP, true); 
                                                                                                                                                                                                                                                                                            NoGyT: 
                                                                                                                                                                                                                                                                                            } 
                                                                                                                                                                                                                                                                                            XjPhW: 
                                                                                                                                                                                                                                                                                                do_action("woocommerce_checkout_create_order_shipping_item", $t9Fuv, $hb6ZD, $rWFN3, $BP_Lq); 
                                                                                                                                                                                                                                                                                                $mz6z3 = 0; 
                                                                                                                                                                                                                                                                                                if (!empty($GzGLG->taxes)) { 
                                                                                                                                                                                                                                                                                                    $mz6z3 = wc_round_tax_total(array_sum(array_map("wc_round_tax_total", $GzGLG->taxes))); 
                                                                                                                                                                                                                                                                                                } 
                                                                                                                                                                                                                                                                                                $BP_Lq->add_item($t9Fuv); 
                                                                                                                                                                                                                                                                                                $BP_Lq->set_shipping_total($GzGLG->cost); 
                                                                                                                                                                                                                                                                                                $BP_Lq->set_shipping_tax($mz6z3); 
                                                                                                                                                                                                                                                                                                $this->logger->debug(__FILE__, 1274, "Shipping total: " . $GzGLG->cost . ", tax: " . $mz6z3); 
                                                                                                                                                                                                                                                                                                $this->packageTotal+= $GzGLG->cost + $mz6z3; 
                                                                                                                                                                                                                                                                                            } 
                                                                                                                                                                                                                                                                                            private function addPackageCoupons(WC_Order $BP_Lq, array $rWFN3): 
                                                                                                                                                                                                                                                                                                void { 
                                                                                                                                                                                                                                                                                                    $this->logger->debug(__FILE__, 1289, "addPackageCoupons"); 
                                                                                                                                                                                                                                                                                                    $BP_Lq->save(); 
                                                                                                                                                                                                                                                                                                    $tacLo = 0; 
                                                                                                                                                                                                                                                                                                    $xWAVc = 0; 
                                                                                                                                                                                                                                                                                                    $DIvxp = new WC_Discounts($BP_Lq); 
                                                                                                                                                                                                                                                                                                    foreach ($rWFN3["applied_coupons"] as $NAWbE) { 
                                                                                                                                                                                                                                                                                                        $this->logger->debug(__FILE__, 1300, "apply coupon: {$NAWbE}"); 
                                                                                                                                                                                                                                                                                                        $DIvxp->apply_coupon(new WC_Coupon($NAWbE)); 
                                                                                                                                                                                                                                                                                                        MlIZa: 
                                                                                                                                                                                                                                                                                                        } 
                                                                                                                                                                                                                                                                                                        z8bjj: 
                                                                                                                                                                                                                                                                                                            $pGK51 = $BP_Lq->get_items(); 
                                                                                                                                                                                                                                                                                                            $this->logger->debug(__FILE__, 1306, "Number of items in the order: " . count($pGK51)); 
                                                                                                                                                                                                                                                                                                            foreach ($DIvxp->get_discounts(false) as $NAWbE => $gSh82) { 
                                                                                                                                                                                                                                                                                                                $HM4iA = $this->getCouponProps($DIvxp->get_items(), $gSh82); 
                                                                                                                                                                                                                                                                                                                if (!empty($HM4iA)) { 
                                                                                                                                                                                                                                                                                                                    $HM4iA["code"] = $NAWbE; 
                                                                                                                                                                                                                                                                                                                    $tacLo+= $HM4iA["discount"]; 
                                                                                                                                                                                                                                                                                                                    $xWAVc+= $HM4iA["discount_tax"]; 
                                                                                                                                                                                                                                                                                                                    $this->addPackageCoupon($BP_Lq, $HM4iA); 
                                                                                                                                                                                                                                                                                                                } 
                                                                                                                                                                                                                                                                                                                KPWZX: 
                                                                                                                                                                                                                                                                                                                } 
                                                                                                                                                                                                                                                                                                                y7JF0: 
                                                                                                                                                                                                                                                                                                                    $BP_Lq->set_discount_total($tacLo); 
                                                                                                                                                                                                                                                                                                                    $BP_Lq->set_discount_tax($xWAVc); 
                                                                                                                                                                                                                                                                                                                } 
                                                                                                                                                                                                                                                                                                                private function addPackageCoupon(WC_Order $BP_Lq, array $HM4iA): 
                                                                                                                                                                                                                                                                                                                    void { 
                                                                                                                                                                                                                                                                                                                        $this->logger->debug(__FILE__, 1333, "addPackageCoupon: " . print_r($HM4iA, true)); 
                                                                                                                                                                                                                                                                                                                        $t9Fuv = new WC_Order_Item_Coupon(); 
                                                                                                                                                                                                                                                                                                                        $t9Fuv->set_props($HM4iA); 
                                                                                                                                                                                                                                                                                                                        $xJfMD = new WC_Coupon($HM4iA["code"]); 
                                                                                                                                                                                                                                                                                                                        $OyNF2 = $xJfMD->get_data(); 
                                                                                                                                                                                                                                                                                                                        unset($OyNF2["used_by"]); 
                                                                                                                                                                                                                                                                                                                        $t9Fuv->add_meta_data("coupon_data", $OyNF2); 
                                                                                                                                                                                                                                                                                                                        do_action("woocommerce_checkout_create_order_coupon_item", $t9Fuv, $HM4iA["code"], $xJfMD, $BP_Lq); 
                                                                                                                                                                                                                                                                                                                        $BP_Lq->add_item($t9Fuv); 
                                                                                                                                                                                                                                                                                                                    } 
                                                                                                                                                                                                                                                                                                                    private function getCouponProps(array $hlNO7, array $gSh82): 
                                                                                                                                                                                                                                                                                                                        array { 
                                                                                                                                                                                                                                                                                                                            $this->logger->debug(__FILE__, 1359, "getCouponProps: " . count($hlNO7) . ", " . count($gSh82)); 
                                                                                                                                                                                                                                                                                                                            if (empty($hlNO7) || empty($gSh82)) { 
                                                                                                                                                                                                                                                                                                                                $this->logger->debug(__FILE__, 1362, "We can't continue because data are empty"); 
                                                                                                                                                                                                                                                                                                                                return []; 
                                                                                                                                                                                                                                                                                                                            } 
                                                                                                                                                                                                                                                                                                                            $N25i5 = 0; 
                                                                                                                                                                                                                                                                                                                            $pneh_ = 0; 
                                                                                                                                                                                                                                                                                                                            $pPNrD = []; 
                                                                                                                                                                                                                                                                                                                            foreach ($gSh82 as $wVOjQ => $nU7j3) { 
                                                                                                                                                                                                                                                                                                                                $this->logger->debug(__FILE__, 1371, "itemKey: {$wVOjQ}, discount: {$nU7j3}"); 
                                                                                                                                                                                                                                                                                                                                $N25i5+= $nU7j3; 
                                                                                                                                                                                                                                                                                                                                if ($this->orderData["calculate_tax"]) { 
                                                                                                                                                                                                                                                                                                                                    $t9Fuv = $hlNO7[$wVOjQ]; 
                                                                                                                                                                                                                                                                                                                                    if ($t9Fuv->product->is_taxable()) { 
                                                                                                                                                                                                                                                                                                                                        $Yev5C = $t9Fuv->product->get_tax_class(); 
                                                                                                                                                                                                                                                                                                                                        if (!isset($pPNrD[$Yev5C])) { 
                                                                                                                                                                                                                                                                                                                                            $pPNrD[$Yev5C] = WC_Tax::get_rates($Yev5C, $this->orderData["customer"]); 
                                                                                                                                                                                                                                                                                                                                        } 
                                                                                                                                                                                                                                                                                                                                        $L8iPo = wc_round_tax_total(array_sum(WC_Tax::calc_tax($nU7j3, $pPNrD[$Yev5C], $this->orderData["prices_include_tax"])), 0); 
                                                                                                                                                                                                                                                                                                                                        $this->logger->debug(__FILE__, 1395, "itemDiscountTax: " . $L8iPo); 
                                                                                                                                                                                                                                                                                                                                        $pneh_+= $L8iPo; 
                                                                                                                                                                                                                                                                                                                                        if ($this->orderData["prices_include_tax"]) { 
                                                                                                                                                                                                                                                                                                                                            $N25i5-= $L8iPo; 
                                                                                                                                                                                                                                                                                                                                        } 
                                                                                                                                                                                                                                                                                                                                    } 
                                                                                                                                                                                                                                                                                                                                } 
                                                                                                                                                                                                                                                                                                                                dClru: 
                                                                                                                                                                                                                                                                                                                                } 
                                                                                                                                                                                                                                                                                                                                hNKyy: 
                                                                                                                                                                                                                                                                                                                                    return ["discount" => $N25i5, "discount_tax" => $pneh_]; 
                                                                                                                                                                                                                                                                                                                                } 
                                                                                                                                                                                                                                                                                                                                private function buildPackageOrder(WC_Order $BP_Lq, array $rWFN3): 
                                                                                                                                                                                                                                                                                                                                    void { 
                                                                                                                                                                                                                                                                                                                                        $this->logger->debug(__FILE__, 1423, "buildPackageOrder"); 
                                                                                                                                                                                                                                                                                                                                        $this->packageTotal = 0; 
                                                                                                                                                                                                                                                                                                                                        $this->setPackageAddress($BP_Lq); 
                                                                                                                                                                                                                                                                                                                                        $this->setPackagePaymentMethod($BP_Lq); 
                                                                                                                                                                                                                                                                                                                                        $this->addPackageShippingRate($BP_Lq, $rWFN3); 
                                                                                                                                                                                                                                                                                                                                        $this->addPackageItems($BP_Lq, $rWFN3); 
                                                                                                                                                                                                                                                                                                                                        $this->addPackageFees($BP_Lq, $rWFN3); 
                                                                                                                                                                                                                                                                                                                                        $this->addPackageTaxes($BP_Lq, $rWFN3); 
                                                                                                                                                                                                                                                                                                                                        $this->addPackageCoupons($BP_Lq, $rWFN3); 
                                                                                                                                                                                                                                                                                                                                        $this->logger->debug(__FILE__, 1435, "Package Total: " . $this->packageTotal); 
                                                                                                                                                                                                                                                                                                                                        $BP_Lq->set_total(round($this->packageTotal, wc_get_price_decimals())); 
                                                                                                                                                                                                                                                                                                                                        $Ao9xj = $BP_Lq->save(); 
                                                                                                                                                                                                                                                                                                                                        if (!empty($Ao9xj)) { 
                                                                                                                                                                                                                                                                                                                                            update_post_meta($Ao9xj, "_package_key", $rWFN3["packageKey"], true); 
                                                                                                                                                                                                                                                                                                                                            do_action("woocommerce_checkout_update_order_meta", $Ao9xj, $this->orderData["posted"]); 
                                                                                                                                                                                                                                                                                                                                        } else { 
                                                                                                                                                                                                                                                                                                                                            $this->logger->debug(__FILE__, 1447, "Unable to save package order"); 
                                                                                                                                                                                                                                                                                                                                        } 
                                                                                                                                                                                                                                                                                                                                    } 
                                                                                                                                                                                                                                                                                                                                    private function createBlankOrder(): 
                                                                                                                                                                                                                                                                                                                                        WC_Order { 
                                                                                                                                                                                                                                                                                                                                            $this->logger->debug(__FILE__, 1458, "createBlankOrder"); 
                                                                                                                                                                                                                                                                                                                                            $aYSBD = ["status" => apply_filters("woocommerce_default_order_status", "pending"), "customer_id" => $this->orderData["customer_id"], "customer_note" => isset($this->orderData["posted"]["order_comments"]) ? $this->orderData["posted"]["order_comments"] : '', "cart_hash" => $this->orderData["cart_hash"], "created_via" => "checkout"]; 
                                                                                                                                                                                                                                                                                                                                            if (!empty($this->settings["customerNote"])) { 
                                                                                                                                                                                                                                                                                                                                                if (!empty($aYSBD["customer_note"])) { 
                                                                                                                                                                                                                                                                                                                                                    $aYSBD["customer_note"].= "
\xa"; 
                                                                                                                                                                                                                                                                                                                                                } 
                                                                                                                                                                                                                                                                                                                                                $aYSBD["customer_note"].= $this->settings["customerNote"]; 
                                                                                                                                                                                                                                                                                                                                            } 
                                                                                                                                                                                                                                                                                                                                            $BP_Lq = wc_create_order($aYSBD); 
                                                                                                                                                                                                                                                                                                                                            $BP_Lq->set_currency($this->orderData["currency"]); 
                                                                                                                                                                                                                                                                                                                                            $BP_Lq->set_prices_include_tax($this->orderData["prices_include_tax"]); 
                                                                                                                                                                                                                                                                                                                                            $BP_Lq->set_customer_ip_address($this->orderData["ip_address"]); 
                                                                                                                                                                                                                                                                                                                                            $BP_Lq->set_customer_user_agent($this->orderData["user_agent"]); 
                                                                                                                                                                                                                                                                                                                                            $Ao9xj = $BP_Lq->get_id(); 
                                                                                                                                                                                                                                                                                                                                            $this->logger->debug(__FILE__, 1483, "New order ID:" . $Ao9xj); 
                                                                                                                                                                                                                                                                                                                                            do_action("woocommerce_new_order", $Ao9xj, $BP_Lq); 
                                                                                                                                                                                                                                                                                                                                            return $BP_Lq; 
                                                                                                                                                                                                                                                                                                                                        } 
                                                                                                                                                                                                                                                                                                                                        private function isPackageOrder(int $Ao9xj): 
                                                                                                                                                                                                                                                                                                                                            bool { 
                                                                                                                                                                                                                                                                                                                                                $wZL9e = get_post_meta($Ao9xj, "_main_order_id", true); 
                                                                                                                                                                                                                                                                                                                                                if (!empty($wZL9e)) { 
                                                                                                                                                                                                                                                                                                                                                    return true; 
                                                                                                                                                                                                                                                                                                                                                } 
                                                                                                                                                                                                                                                                                                                                                return false; 
                                                                                                                                                                                                                                                                                                                                            } 
                                                                                                                                                                                                                                                                                                                                            private function getPackageOrderIds(int $Ao9xj): 
                                                                                                                                                                                                                                                                                                                                                array { 
                                                                                                                                                                                                                                                                                                                                                    $n2Rul = get_post_meta($Ao9xj, "_package_order_ids", true); 
                                                                                                                                                                                                                                                                                                                                                    if (empty($n2Rul)) { 
                                                                                                                                                                                                                                                                                                                                                        $this->logger->debug(__FILE__, 1517, "No package orders have been found"); 
                                                                                                                                                                                                                                                                                                                                                        return []; 
                                                                                                                                                                                                                                                                                                                                                    } 
                                                                                                                                                                                                                                                                                                                                                    $this->logger->debug(__FILE__, 1521, "Package order ids: " . implode(",", $n2Rul)); 
                                                                                                                                                                                                                                                                                                                                                    return $n2Rul; 
                                                                                                                                                                                                                                                                                                                                                } 
                                                                                                                                                                                                                                                                                                                                                private function isMainOrder(int $Ao9xj): 
                                                                                                                                                                                                                                                                                                                                                    bool { 
                                                                                                                                                                                                                                                                                                                                                        return !empty($this->getPackageOrderIds($Ao9xj)); 
                                                                                                                                                                                                                                                                                                                                                    } 
                                                                                                                                                                                                                                                                                                                                                    private function getPackageOrders(int $Ao9xj): 
                                                                                                                                                                                                                                                                                                                                                        array { 
                                                                                                                                                                                                                                                                                                                                                            $n2Rul = $this->getPackageOrderIds($Ao9xj); 
                                                                                                                                                                                                                                                                                                                                                            $mpfHi = []; 
                                                                                                                                                                                                                                                                                                                                                            foreach ($n2Rul as $US60j) { 
                                                                                                                                                                                                                                                                                                                                                                $xFrjX = wc_get_order($US60j); 
                                                                                                                                                                                                                                                                                                                                                                if (!empty($xFrjX)) { 
                                                                                                                                                                                                                                                                                                                                                                    $mpfHi[] = $xFrjX; 
                                                                                                                                                                                                                                                                                                                                                                } 
                                                                                                                                                                                                                                                                                                                                                                uE0R4: 
                                                                                                                                                                                                                                                                                                                                                                } 
                                                                                                                                                                                                                                                                                                                                                                YfhSU: 
                                                                                                                                                                                                                                                                                                                                                                    return $mpfHi; 
                                                                                                                                                                                                                                                                                                                                                                } 
                                                                                                                                                                                                                                                                                                                                                                private function createPackageOrders(int $Ao9xj): 
                                                                                                                                                                                                                                                                                                                                                                    array { 
                                                                                                                                                                                                                                                                                                                                                                        $this->logger->debug(__FILE__, 1568, "createPackageOrders: {$Ao9xj}"); 
                                                                                                                                                                                                                                                                                                                                                                        if (empty($this->orderData) || empty($this->orderData["packages"])) { 
                                                                                                                                                                                                                                                                                                                                                                            $this->logger->debug(__FILE__, 1571, "Order data are not set, so we can't continue"); 
                                                                                                                                                                                                                                                                                                                                                                            return []; 
                                                                                                                                                                                                                                                                                                                                                                        } 
                                                                                                                                                                                                                                                                                                                                                                        if ($this->isPackageOrder($Ao9xj)) { 
                                                                                                                                                                                                                                                                                                                                                                            $this->logger->debug(__FILE__, 1577, "It is a package order, so we can't create more package orders for it"); 
                                                                                                                                                                                                                                                                                                                                                                            return []; 
                                                                                                                                                                                                                                                                                                                                                                        } 
                                                                                                                                                                                                                                                                                                                                                                        $mpfHi = []; 
                                                                                                                                                                                                                                                                                                                                                                        $n2Rul = []; 
                                                                                                                                                                                                                                                                                                                                                                        try { 
                                                                                                                                                                                                                                                                                                                                                                            wc_transaction_query("start"); 
                                                                                                                                                                                                                                                                                                                                                                            foreach ($this->orderData["packages"] as $hb6ZD => $rWFN3) { 
                                                                                                                                                                                                                                                                                                                                                                                $this->logger->debug(__FILE__, 1590, "Shipping package: {$hb6ZD}, " . $rWFN3["packageKey"]); 
                                                                                                                                                                                                                                                                                                                                                                                $xFrjX = $this->createPackageOrder($Ao9xj, $rWFN3); 
                                                                                                                                                                                                                                                                                                                                                                                if (!empty($xFrjX)) { 
                                                                                                                                                                                                                                                                                                                                                                                    $mpfHi[] = $xFrjX; 
                                                                                                                                                                                                                                                                                                                                                                                    $n2Rul[] = $xFrjX->get_id(); 
                                                                                                                                                                                                                                                                                                                                                                                } 
                                                                                                                                                                                                                                                                                                                                                                                ZXanU: 
                                                                                                                                                                                                                                                                                                                                                                                } 
                                                                                                                                                                                                                                                                                                                                                                                rx4Vg: 
                                                                                                                                                                                                                                                                                                                                                                                    wc_transaction_query("commit"); 
                                                                                                                                                                                                                                                                                                                                                                                } 
                                                                                                                                                                                                                                                                                                                                                                                catch(Exception $eVtPG) { 
                                                                                                                                                                                                                                                                                                                                                                                    wc_transaction_query("rollback"); 
                                                                                                                                                                                                                                                                                                                                                                                    return new WP_Error("checkout-error", $eVtPG->getMessage()); 
                                                                                                                                                                                                                                                                                                                                                                                } 
                                                                                                                                                                                                                                                                                                                                                                                if (!empty($n2Rul)) { 
                                                                                                                                                                                                                                                                                                                                                                                    $this->logger->debug(__FILE__, 1608, "add package order ids to meta: " . implode(",", $n2Rul)); 
                                                                                                                                                                                                                                                                                                                                                                                    update_post_meta($Ao9xj, "_package_order_ids", $n2Rul); 
                                                                                                                                                                                                                                                                                                                                                                                    update_post_meta($Ao9xj, "_needs_payment", $this->orderData["needs_payment"]); 
                                                                                                                                                                                                                                                                                                                                                                                    update_post_meta($Ao9xj, "_order_stock_reduced", "1", true); 
                                                                                                                                                                                                                                                                                                                                                                                    update_post_meta($Ao9xj, "_wc_points_earned", "0", true); 
                                                                                                                                                                                                                                                                                                                                                                                } 
                                                                                                                                                                                                                                                                                                                                                                                $BP_Lq = wc_get_order($Ao9xj); 
                                                                                                                                                                                                                                                                                                                                                                                if (is_object($BP_Lq)) { 
                                                                                                                                                                                                                                                                                                                                                                                    $BP_Lq->add_order_note("Order has been split into the following orders: " . implode(",", $n2Rul) . "
Each of the orders will be fulfilled separately", false); 
                                                                                                                                                                                                                                                                                                                                                                                } 
                                                                                                                                                                                                                                                                                                                                                                                return $mpfHi; 
                                                                                                                                                                                                                                                                                                                                                                            } 
                                                                                                                                                                                                                                                                                                                                                                            private function createPackageOrder(int $Ao9xj, array $rWFN3): ? WC_Order { 
                                                                                                                                                                                                                                                                                                                                                                                    $xFrjX = $this->createBlankOrder(); 
                                                                                                                                                                                                                                                                                                                                                                                    if (empty($xFrjX)) { 
                                                                                                                                                                                                                                                                                                                                                                                        return null; 
                                                                                                                                                                                                                                                                                                                                                                                    } 
                                                                                                                                                                                                                                                                                                                                                                                    update_post_meta($xFrjX->get_id(), "_main_order_id", $Ao9xj, true); 
                                                                                                                                                                                                                                                                                                                                                                                    $this->buildPackageOrder($xFrjX, $rWFN3); 
                                                                                                                                                                                                                                                                                                                                                                                    $this->addPackageOrderNote($xFrjX, $Ao9xj); 
                                                                                                                                                                                                                                                                                                                                                                                    return $xFrjX; 
                                                                                                                                                                                                                                                                                                                                                                                } 
                                                                                                                                                                                                                                                                                                                                                                                private function addPackageOrderNote(WC_Order $xFrjX, int $wZL9e) : void { 
                                                                                                                                                                                                                                                                                                                                                                                    $v9JKR = sprintf(__("Main order ID: %d", "woocommerce"), $wZL9e); 
                                                                                                                                                                                                                                                                                                                                                                                    $xFrjX->add_order_note($v9JKR, $this->settings["orderNoteType"] === "customer"); 
                                                                                                                                                                                                                                                                                                                                                                                    if ($this->settings["autoCustomerNote"] === "yes") { 
                                                                                                                                                                                                                                                                                                                                                                                        $wrVzK = $xFrjX->get_customer_note(); 
                                                                                                                                                                                                                                                                                                                                                                                        if (!empty($wrVzK)) { 
                                                                                                                                                                                                                                                                                                                                                                                            $wrVzK.= "
\xa"; 
                                                                                                                                                                                                                                                                                                                                                                                        } 
                                                                                                                                                                                                                                                                                                                                                                                        $wrVzK.= $v9JKR; 
                                                                                                                                                                                                                                                                                                                                                                                        $xFrjX->set_customer_note($wrVzK); 
                                                                                                                                                                                                                                                                                                                                                                                    } 
                                                                                                                                                                                                                                                                                                                                                                                } 
                                                                                                                                                                                                                                                                                                                                                                                private function getAvailablePaymentMethods(): 
                                                                                                                                                                                                                                                                                                                                                                                    array { 
                                                                                                                                                                                                                                                                                                                                                                                        if (is_array(self::$availablePaymentGateways)) { 
                                                                                                                                                                                                                                                                                                                                                                                            return self::$availablePaymentGateways; 
                                                                                                                                                                                                                                                                                                                                                                                        } 
                                                                                                                                                                                                                                                                                                                                                                                        self::$availablePaymentGateways = []; 
                                                                                                                                                                                                                                                                                                                                                                                        $FYCJd = []; 
                                                                                                                                                                                                                                                                                                                                                                                        if (class_exists("WC_Payment_Gateways")) { 
                                                                                                                                                                                                                                                                                                                                                                                            $FYCJd = WC_Payment_Gateways::instance()->get_available_payment_gateways(); 
                                                                                                                                                                                                                                                                                                                                                                                        } 
                                                                                                                                                                                                                                                                                                                                                                                        foreach ($FYCJd as $tkufx => $rPWk5) { 
                                                                                                                                                                                                                                                                                                                                                                                            self::$availablePaymentGateways[$tkufx] = $rPWk5->get_method_title(); 
                                                                                                                                                                                                                                                                                                                                                                                            Oq5GL: 
                                                                                                                                                                                                                                                                                                                                                                                            } 
                                                                                                                                                                                                                                                                                                                                                                                            Jww37: 
                                                                                                                                                                                                                                                                                                                                                                                                return self::$availablePaymentGateways; 
                                                                                                                                                                                                                                                                                                                                                                                            } 
                                                                                                                                                                                                                                                                                                                                                                                        } 
?>

Did this file decode correctly?

Original Code

<?php
declare(strict_types = 1);
namespace OneTeamSoftware\WC\PackageOrders;
use Exception;
use OneTeamSoftware\WC\Logger\Logger;
use OneTeamSoftware\WP\Admin\OneTeamSoftware;
use OneTeamSoftware\WP\PluginDependency\PluginDependency;
use OneTeamSoftware\WP\PluginLife\Client\Client;
use WC_Coupon;
use WC_Discounts;
use WC_Geolocation;
use WC_Log_Handler_File;
use WC_Order;
use WC_Order_Item_Coupon;
use WC_Order_Item_Fee;
use WC_Order_Item_Product;
use WC_Order_Item_Shipping;
use WC_Order_Item_Tax;
use WC_Payment_Gateways;
use WC_Tax;
use WP_Error;
class PackageOrders {
    private $id;
    private $pluginPath;
    private $mainMenuId;
    private $settings;
    private $orderData;
    private $templatePath;
    private $packageTotal;
    private $packages;
    private $settingsOptionKey;
    private $logger;
    private $pluginLifeClient;
    private static $availablePaymentGateways = null;
    public function __construct(string $tnBiO) {
        $this->id = "\167\143\x5f\160\x61\143\x6b\x61\x67\x65\x5f\x6f\162\x64\x65\x72\x73";
        $this->pluginPath = $tnBiO;
        $this->mainMenuId = "\x6f\x6e\145\x74\x65\141\155\163\x6f\x66\x74\167\x61\x72\x65";
        $this->settingsOptionKey = "\167\157\157\143\x6f\155\155\145\x72\x63\145\x5f\167\143\x5f\163\x68\151\x70\160\151\156\147\x5f\x70\141\143\x6b\x61\x67\x65\x73\137\163\145\164\x74\x69\x6e\x67\x73";
        $this->orderData = [];
        $this->templatePath = dirname($tnBiO) . "\x2f\x74\x65\155\160\x6c\141\x74\x65\x73\57";
        $this->packageTotal = 0;
        $this->packages = [];
        $this->settings = [];
        $this->loadSettings();
        $this->logger = new Logger($this->id, $this->settings["\144\145\142\165\147"] === "\x79\x65\163");
    }
    public function register():
        void {
            add_filter("\160\154\x75\147\151\156\x5f\141\143\164\151\x6f\156\137\154\151\x6e\x6b\163\137" . plugin_basename($this->pluginPath), [$this, "\157\156\x50\x6c\165\147\151\x6e\x41\x63\x74\151\x6f\156\x4c\151\x6e\x6b\x73"], 1, 1);
            $zIqGK = new PluginDependency($this->id, __("\x50\x61\x63\x6b\x61\147\145\40\117\x72\x64\145\x72\163", $this->id));
            $zIqGK->add("\x77\157\157\143\157\155\155\x65\162\x63\x65\57\167\x6f\157\143\157\155\155\x65\x72\x63\145\56\160\150\x70", __("\x57\x6f\x6f\x43\157\x6d\155\145\162\x63\x65", $this->id), admin_url("\57\x70\x6c\x75\x67\x69\156\55\x69\x6e\163\x74\x61\x6c\154\x2e\x70\x68\x70\77\164\141\x62\x3d\x70\x6c\x75\x67\x69\x6e\55\x69\156\146\x6f\x72\x6d\141\x74\151\x6f\x6e\46\160\154\165\147\x69\x6e\x3d\167\157\x6f\143\x6f\x6d\155\145\x72\x63\145\46\x54\x42\137\151\x66\162\141\155\145\75\164\x72\x75\x65\x26\x77\x69\144\164\150\75\x36\x30\60\x26\150\145\x69\147\x68\164\75\x35\x35\x30"));
            $zIqGK->add("\167\143\x2d\163\x68\151\160\x70\151\156\147\x2d\160\141\143\x6b\141\x67\x65\x73\x2f\x77\143\x2d\163\x68\151\160\160\151\156\x67\55\160\x61\143\x6b\x61\x67\145\163\x2e\160\x68\x70", __("\x53\150\151\160\x70\x69\x6e\147\40\120\x61\x63\x6b\x61\x67\145\163", $this->id), admin_url("\x2f\x70\154\165\x67\151\156\x2d\151\x6e\x73\164\141\x6c\x6c\56\160\150\x70\x3f\164\x61\x62\x3d\x70\154\165\147\151\156\x2d\x69\156\146\x6f\x72\155\141\164\x69\x6f\x6e\x26\160\154\x75\147\151\x6e\75\167\x63\55\163\150\x69\x70\160\151\156\147\55\160\141\143\x6b\x61\147\145\163\46\x54\102\137\x69\x66\x72\141\155\145\75\164\x72\165\145\x26\x77\151\x64\x74\150\75\66\x30\x30\46\150\x65\x69\147\x68\164\75\65\65\60"));
            $zIqGK->register();
            if (!$zIqGK->validate()) {
                return;
            }
            add_filter("\x77\143\137\x73\x68\151\160\x70\151\x6e\147\137\x70\141\x63\x6b\141\x67\x65\163\x5f\163\x65\164\164\x69\156\147\x73", [$this, "\x6f\x6e\123\x65\x74\x74\151\156\x67\163"], 11, 1);
            add_action("\x77\x6f\157\x63\157\155\155\x65\x72\143\x65\137\163\x65\x74\164\151\x6e\x67\163\x5f\163\x61\x76\145\144", [$this, "\x6f\x6e\123\x65\164\x74\x69\x6e\x67\163\x53\x61\166\x65\144"]);
            if (is_admin()) {
                OneTeamSoftware::instance()->register();
                add_action("\141\144\x6d\151\156\x5f\x6d\x65\x6e\165", [$this, "\x6f\156\101\144\x6d\x69\x6e\x4d\145\x6e\165"]);
            }
            if ($this->settings["\145\156\x61\142\x6c\x65\120\141\143\153\x61\147\145\117\162\144\x65\162\x73"] !== "\x79\145\x73") {
                return;
            }
            if ($this->settings["\x65\156\x61\x62\154\145\123\150\151\x70\x53\164\141\164\151\x6f\156\x49\156\164\x65\x67\x72\x61\x74\x69\157\x6e"] === "\x79\x65\x73") {
                $coc7D = "\x63\165\x73\x74\157\155\x5f\x66\x69\145\x6c\144\x5f\x32";
                if (isset($this->settings["\x73\x68\x69\x70\123\164\x61\164\x69\x6f\156\x43\x75\163\164\157\x6d\x46\x69\145\154\x64"]) && in_array($this->settings["\163\150\151\x70\x53\164\141\x74\151\157\156\x43\x75\x73\164\157\155\x46\151\x65\154\144"], ["\143\165\163\x74\x6f\155\137\x66\151\145\154\x64\x5f\x32", "\143\x75\163\164\x6f\155\x5f\146\151\145\x6c\144\137\x33"], true)) {
                    $coc7D = $this->settings["\x73\150\151\x70\123\164\x61\164\x69\157\x6e\x43\165\x73\164\x6f\x6d\x46\x69\x65\154\144"];
                }
                add_filter("\x77\157\x6f\143\157\x6d\x6d\145\162\x63\145\x5f\x73\150\x69\160\x73\x74\x61\x74\x69\157\x6e\x5f\145\170\160\157\162\164\x5f" . $coc7D, [$this, "\157\156\x53\x68\151\160\x53\164\141\x74\x69\x6f\x6e\x45\x78\x70\x6f\162\x74\103\165\163\164\157\155\106\151\x65\x6c\144"], 100);
            }
            add_action("\167\157\157\143\x6f\x6d\155\145\x72\143\x65\x5f\151\x6e\x69\x74", [$this, "\157\x6e\x49\x6e\x69\164"], 100, 1);
            add_filter("\167\157\157\x63\x6f\155\x6d\x65\162\143\x65\137\x63\x61\156\137\x72\x65\x64\165\143\145\x5f\x6f\162\144\145\x72\x5f\x73\x74\x6f\x63\x6b", [$this, "\x6f\156\103\x61\x6e\x52\x65\144\165\x63\x65\x4f\162\x64\x65\162\123\164\x6f\143\153"], 1, 2);
            add_action("\x77\157\157\143\x6f\x6d\155\145\x72\143\145\x5f\155\x61\x69\x6e\x6f\x72\144\145\162\137\x73\x74\141\164\165\163\137\x63\150\x61\156\x67\145\144", [$this, "\157\156\x4d\x61\151\x6e\117\162\x64\x65\x72\x53\164\141\164\165\x73\x43\150\141\x6e\147\x65\x64"], 1, 4);
            add_action("\x77\x6f\x6f\143\157\155\x6d\145\162\143\145\137\x6d\x61\151\x6e\157\x72\144\x65\x72\x5f\x70\x61\x79\x6d\145\156\x74\137\163\164\x61\x74\165\x73\137\x63\150\141\x6e\147\145\144", [$this, "\x73\145\164\115\x61\151\156\117\x72\144\x65\162\x41\x73\103\141\x6e\x63\145\x6c\x6c\145\x64"], 1, 2);
            add_action("\167\157\157\143\x6f\155\x6d\x65\162\143\145\137\162\145\146\165\x6e\x64\x5f\143\162\x65\x61\x74\145\144", [$this, "\157\x6e\x4d\141\151\156\117\x72\x64\x65\162\x52\145\146\165\156\x64\145\x64"], 1, 2);
            add_filter("\x77\x6f\x6f\x63\157\155\155\x65\x72\x63\x65\137\x70\x61\x79\x6d\x65\156\164\x5f\163\165\x63\x63\x65\163\x73\x66\x75\x6c\137\162\x65\x73\165\154\164", [$this, "\157\156\x50\141\x79\x6d\145\x6e\x74\123\x75\143\143\x65\163\x73\x66\165\x6c\x52\145\163\165\x6c\164"], 100, 2);
        }
        public function onPluginActionLinks(array $xsep7):
            array {
                $cb1X3 = sprintf("\74\141\40\x68\162\x65\146\x3d\x22\x25\163\x22\x3e\x25\163\74\x2f\x61\76", admin_url("\141\x64\x6d\x69\x6e\x2e\160\x68\x70\77\x70\x61\147\x65\x3d\167\x63\x2d\x73\145\164\x74\151\156\147\163\46\x74\141\x62\75\163\150\x69\160\160\x69\x6e\147\46\x73\145\x63\164\151\x6f\x6e\x3d\167\x63\137\163\150\151\x70\160\x69\x6e\x67\137\x70\141\143\x6b\x61\x67\x65\163"), __("\x53\145\164\164\151\x6e\147\x73", $this->id));
                array_unshift($xsep7, $cb1X3);
                return $xsep7;
            }
            public function onAdminMenu():
                void {
                    add_submenu_page($this->mainMenuId, __("\x50\x61\143\x6b\x61\x67\145\40\x4f\162\144\x65\x72\163", $this->id), __("\x50\x61\x63\x6b\x61\x67\145\40\x4f\162\144\x65\x72\163", $this->id), "\155\141\156\141\x67\x65\x5f\x6f\160\164\151\x6f\x6e\163", "\141\144\x6d\151\x6e\56\160\x68\x70\x3f\160\x61\147\145\x3d\167\143\x2d\163\x65\x74\x74\151\156\x67\163\x26\164\141\x62\x3d\163\x68\x69\160\160\151\x6e\147\46\x73\145\143\x74\x69\x6f\x6e\x3d\167\x63\137\163\150\151\x70\x70\x69\156\147\x5f\x70\141\x63\153\x61\x67\x65\163");
                }
                public function onSettingsSaved():
                    void {
                        $this->loadSettings();
                    }
                    public function onInit():
                        void {
                            (new Hooks\OrderWeight())->register();
                            add_action("\x77\157\157\143\x6f\x6d\155\x65\162\x63\145\137\163\145\x74\x5f\143\141\x72\164\x5f\x70\x61\x63\x6b\141\147\145\x73", [$this, "\157\x6e\123\145\x74\103\x61\x72\164\120\141\x63\x6b\x61\147\x65\163"], 100, 1);
                            add_action("\167\x6f\x6f\x63\x6f\155\155\x65\162\x63\145\137\x70\141\x79\155\145\156\164\137\143\x6f\155\160\154\x65\164\145", [$this, "\x6f\x6e\x50\141\x79\155\x65\x6e\x74\x43\x6f\155\x70\154\x65\164\145"], 100, 1);
                            add_filter("\167\x6f\x6f\143\157\155\x6d\145\x72\143\145\137\157\162\144\x65\162\x5f\x63\154\x61\163\163", [$this, "\x6f\156\117\x72\144\x65\x72\x43\154\x61\x73\x73"], 10, 3);
                            add_filter("\x77\x6f\x6f\x63\157\x6d\x6d\x65\162\143\145\137\x63\x68\x65\143\x6b\157\x75\164\137\x75\160\144\141\164\x65\x5f\157\x72\x64\x65\x72\x5f\155\145\x74\141", [$this, "\157\156\x55\x70\x64\x61\x74\145\117\162\144\145\x72\x4d\x65\x74\141"], 1, 2);
                            add_filter("\x77\x6f\x6f\x63\x6f\x6d\x6d\x65\x72\143\x65\x5f\164\150\x61\x6e\x6b\x79\x6f\165\137\x6f\x72\144\145\162\x5f\x69\144", [$this, "\x6f\x6e\124\x68\141\x6e\153\131\x6f\x75"], 10, 1);
                            add_filter("\x77\x6f\157\143\157\155\155\x65\162\143\145\x5f\154\x6f\x63\x61\x74\145\x5f\164\x65\x6d\x70\x6c\141\164\x65", [$this, "\157\x6e\x4c\157\143\x61\x74\145\124\x65\155\160\154\141\x74\145"], 100, 3);
                        }
                        public function onSettings(array $E5lgm):
                            array {
                                $XaDsN = array_search("\155\145\x74\150\x6f\x64\x5f\x73\x65\x74\164\x69\156\147\x73", array_keys($E5lgm), true);
                                $E5lgm = array_slice($E5lgm, 0, $XaDsN, true) + ["\x70\x61\143\153\141\147\x65\117\x72\x64\x65\162\x73\124\151\164\x6c\x65" => ["\x74\171\160\145" => "\164\x69\164\x6c\145", "\x74\x69\164\x6c\x65" => __("\x50\x61\x63\153\x61\147\145\x20\117\x72\144\x65\x72\163", $this->id), "\x64\x65\163\143\x72\x69\160\x74\151\x6f\x6e" => __("\x43\x72\145\141\164\x65\163\40\x73\145\x70\x61\x72\x61\x74\145\40\x6f\162\144\145\162\x20\146\157\x72\x20\x65\141\143\150\x20\x6f\146\40\x74\x68\145\x20\x73\150\x69\x70\x70\x69\x6e\x67\40\x70\141\x63\x6b\141\x67\x65\163\x20\151\x6e\x20\164\x68\145\40\x63\x61\162\164\54\40\163\x6f\40\x74\150\145\171\x20\143\141\156\40\x62\x65\x20\x66\x75\x6c\x66\x69\x6c\154\145\x64\x20\151\x6e\x64\x65\x70\x65\156\x64\x65\x6e\164\x6c\171\x2e", $this->id) ], "\160\x61\x63\153\x61\x67\145\x4f\x72\144\145\162\x73\x4c\x6f\147\x54\x69\x74\x6c\x65" => ["\x74\x79\160\145" => "\164\151\x74\154\145", "\144\145\x73\143\162\x69\160\164\x69\157\x6e" => sprintf("\x3c\x64\151\166\x20\143\154\x61\x73\163\x3d\x22\156\x6f\x74\151\x63\145\x20\x6e\157\164\151\143\x65\x2d\x69\156\146\157\x20\x69\156\154\151\156\x65\42\x3e\74\160\76\x25\x73\x20\74\141\40\x68\x72\x65\x66\x3d\x22\45\163\42\x20\x74\141\x72\x67\x65\164\x3d\x22\137\x62\154\x61\156\x6b\42\76\45\x73\74\x2f\141\76\x20\x25\163\x20\x3c\x73\x74\162\157\x6e\147\x3e\45\x73\74\x2f\163\164\x72\157\x6e\147\x3e\74\x62\x72\x2f\76\x25\163\40\74\x73\164\162\157\x6e\147\x3e\x25\163\74\x2f\x73\x74\x72\x6f\156\147\x3e\x3c\57\x70\x3e\x3c\57\x64\151\166\x3e", __("\114\x6f\147\40\143\141\156\40\x62\x65\40\x66\x6f\165\x6e\144\40\x69\x6e", $this->id), admin_url("\x61\144\155\151\x6e\x2e\x70\x68\x70\77\x70\141\147\x65\x3d\167\143\55\x73\164\x61\x74\165\163\x26\x74\x61\x62\75\154\157\147\x73"), __("\127\x6f\x6f\103\157\155\x6d\145\162\143\145\x20\x2d\x3e\40\123\x74\141\x74\x75\163\40\x2d\76\40\114\x6f\147\163", $this->id), __("\40\x77\x69\x74\x68\x20\164\x68\x65\x20\x6e\141\x6d\145"), basename(WC_Log_Handler_File::get_log_file_path($this->id)), __("\111\x74\40\143\x61\x6e\x20\x61\x6c\x73\157\40\x62\x65\x20\146\x6f\x75\x6e\144\40\151\x6e\72\40", $this->id), WC_Log_Handler_File::get_log_file_path($this->id)) ], $this->id . "\137\x6c\151\x63\145\156\163\145\113\145\171" => ["\x74\171\160\145" => "\164\x65\x78\x74", "\164\151\x74\154\145" => __("\x4c\151\143\x65\x6e\163\x65\x20\113\145\x79", $this->id), "\144\145\x66\141\x75\x6c\164" => '', "\144\x65\x73\143\x72\x69\160\x74\151\x6f\x6e" => __("\101\40\166\141\154\151\x64\x20\x6c\151\x63\145\x6e\163\145\40\153\145\x79\x20\151\x73\x20\x72\145\161\165\x69\x72\145\x64\x20\146\x6f\162\40\x70\x6c\x75\147\151\156\40\164\x6f\x20\167\157\x72\153", $this->id) ], "\145\156\141\142\154\145\x50\141\143\153\141\x67\x65\117\x72\144\145\x72\x73" => ["\164\x79\160\x65" => "\x63\150\145\x63\x6b\x62\157\x78", "\164\151\164\154\145" => __("\x45\156\x61\x62\154\x65\x20\120\141\143\x6b\141\147\x65\40\117\162\144\145\x72\163", $this->id), "\x64\145\163\x63\162\151\x70\x74\x69\x6f\156" => __("\x43\162\x65\x61\164\x65\40\x73\145\160\x61\x72\141\164\145\40\x6f\162\x64\x65\162\x20\x66\157\162\x20\x65\141\143\x68\40\120\141\143\x6b\141\x67\145\x2c\x20\x73\157\x20\x74\150\145\x79\40\x63\x61\156\x20\x62\145\40\146\x75\x6c\146\x69\154\154\x65\144\x20\x69\x6e\x64\145\160\145\156\144\145\156\x74\154\171\x2e", $this->id), "\144\145\x66\x61\x75\154\164" => "\156\x6f"], "\156\157\x50\x61\x79\x6d\145\x6e\x74\106\x6f\162" => ["\x74\171\x70\x65" => "\155\165\x6c\x74\x69\x73\145\x6c\145\x63\164", "\x63\x6c\141\x73\163" => "\x77\143\x2d\x65\x6e\x68\141\156\x63\x65\x64\55\x73\145\x6c\145\x63\x74", "\x74\151\164\x6c\145" => __("\x4e\x6f\x20\120\x61\171\x6d\145\x6e\164\40\106\157\162", $this->id), "\x64\145\163\143\x72\x69\160\164\151\157\156" => __("\x4d\x61\151\x6e\40\x6f\x72\144\145\162\x20\167\x69\154\154\40\x62\x65\40\163\x70\x6c\151\x74\40\167\x69\164\150\x6f\x75\164\40\162\x65\x63\x65\x69\166\x69\156\147\40\141\40\x70\141\171\155\x65\156\164\x20\x66\x6f\x72\x20\x74\x68\x65\x73\x65\x20\160\x61\x79\x6d\145\x6e\164\40\155\145\164\150\157\x64\x73\x2e", $this->id), "\x6f\160\x74\x69\x6f\x6e\x73" => $this->getAvailablePaymentMethods() ], "\164\x72\x61\x73\x68\x4d\141\151\x6e\117\x72\x64\145\162" => ["\164\x79\160\145" => "\x63\150\x65\x63\x6b\142\157\170", "\164\x69\x74\154\x65" => __("\115\x6f\x76\145\x20\115\141\151\x6e\x20\x4f\162\x64\145\x72\x20\164\x6f\40\x54\x72\x61\163\150", $this->id), "\x64\x65\x66\x61\165\154\x74" => "\156\x6f", "\154\141\142\145\154" => __("\x44\x6f\x20\x79\157\x75\40\x77\141\x6e\x74\40\x74\x6f\40\141\x75\x74\x6f\x6d\x61\x74\151\143\x61\154\154\171\40\x6d\157\166\x65\40\115\x61\151\x6e\40\117\162\144\145\162\x20\164\x6f\40\124\162\141\163\150\40\x61\146\x74\x65\x72\40\x70\x61\171\x6d\x65\156\164\40\150\141\163\x20\142\x65\x65\156\40\x72\x65\x63\x65\x69\x76\x65\x64\x3f", $this->id) ], "\x63\x75\163\164\157\155\145\162\116\157\x74\145" => ["\164\171\x70\145" => "\x74\145\x78\164\141\162\145\x61", "\164\151\164\x6c\x65" => __("\x43\165\163\164\157\x6d\145\162\40\116\157\164\x65", $this->id), "\144\x65\x66\x61\165\154\x74" => '', "\144\145\x73\x63\x72\x69\160\x74\x69\157\x6e" => __("\124\150\145\40\146\157\x6c\154\157\167\151\x6e\147\40\163\164\x61\x74\151\x63\40\143\x75\163\x74\x6f\x6d\x65\162\40\156\157\164\145\40\x77\151\154\x6c\x20\x62\145\40\141\144\x64\145\144\40\x74\157\40\143\162\145\x61\x74\x65\x64\40\160\141\143\153\x61\147\x65\x20\x6f\162\144\145\162\163\x2e\x20\111\164\x20\155\151\x67\x68\164\x20\142\145\x20\165\163\145\x66\x75\x6c\x20\x66\x6f\x72\x20\x76\x61\162\x69\157\x75\163\40\x69\156\164\145\x67\162\x61\164\x69\157\156\163\x2e", $this->id) ], "\x61\165\x74\157\103\165\x73\x74\157\x6d\145\162\116\157\x74\145" => ["\164\171\x70\x65" => "\143\x68\145\x63\x6b\x62\x6f\170", "\x74\x69\x74\154\x65" => __("\101\165\x74\x6f\x20\x43\165\163\164\x6f\x6d\145\x72\x20\x4e\157\164\145", $this->id), "\144\145\x66\141\x75\154\164" => "\x6e\x6f", "\x64\145\163\x63\162\151\x70\x74\x69\157\156" => __("\101\x75\x74\x6f\155\x61\x74\x69\143\141\x6c\x6c\x79\40\x61\144\144\40\115\141\151\x6e\x20\117\162\144\x65\x72\40\111\x44\40\x61\163\x20\x61\40\x63\x75\x73\164\x6f\x6d\x65\x72\40\156\157\x74\145\56\40\111\x74\x20\x6d\x69\x67\x68\x74\40\x62\x65\x20\165\x73\x65\x66\x75\x6c\x20\x66\x6f\162\x20\166\141\x72\x69\x6f\165\x73\x20\x69\x6e\164\x65\x67\x72\x61\x74\151\x6f\156\x73\56", $this->id) ], "\x6f\x72\x64\x65\x72\116\157\164\145\124\171\160\145" => ["\x74\x79\x70\x65" => "\x73\145\154\x65\x63\164", "\164\x69\x74\x6c\x65" => __("\117\162\x64\x65\162\x20\x4e\157\164\x65\40\x54\171\160\x65", $this->id), "\x6f\x70\164\x69\x6f\156\x73" => ['' => __("\120\162\151\166\x61\x74\x65\40\116\157\x74\145", $this->id), "\143\165\163\164\157\155\x65\162" => __("\x4e\157\x74\x65\40\164\x6f\40\141\x20\x63\165\163\164\x6f\x6d\145\x72", $this->id) ], "\x64\145\x73\x63\162\x69\x70\x74\151\157\x6e" => __("\101\144\x64\x20\115\141\151\156\x20\x4f\162\x64\x65\x72\40\111\104\40\141\163\x20\x65\x69\164\x68\145\x72\x20\x50\x72\x69\x76\x61\x74\145\40\157\162\x20\x43\x75\x73\164\x6f\155\x65\x72\x20\117\162\144\145\x72\40\116\157\x74\145\56", $this->id), "\x64\x65\x66\141\x75\x6c\x74" => "\156\x6f"], "\163\x68\151\160\123\x74\141\164\x69\x6f\x6e\x49\x6e\x74\x65\x67\x72\x61\x74\151\x6f\x6e\124\x69\x74\x6c\145" => ["\164\171\x70\x65" => "\x74\151\164\x6c\x65", "\164\151\164\x6c\x65" => __("\x53\150\151\160\123\164\141\x74\x69\157\x6e\40\111\x6e\164\x65\x67\x72\x61\x74\x69\157\156", $this->id) ], "\x65\x6e\141\x62\154\145\123\150\151\x70\x53\x74\141\164\151\x6f\x6e\x49\x6e\164\145\147\162\141\x74\x69\x6f\156" => ["\164\171\x70\145" => "\x63\150\145\143\x6b\142\x6f\170", "\x74\x69\x74\x6c\145" => sprintf(__("\105\156\141\x62\x6c\x65\x20\45\x73\x53\x68\x69\160\x53\x74\141\x74\151\x6f\x6e\x25\163\x20\111\x6e\x74\145\147\162\x61\164\x69\157\156", $this->id), "\x3c\141\40\x68\162\145\146\75\x22\150\164\164\160\x3a\57\57\142\151\164\x2e\x6c\x79\x2f\x33\x32\x36\125\101\142\163\42\40\164\141\162\x67\x65\x74\75\x22\x5f\142\154\141\156\153\42\76", "\x3c\x2f\x61\x3e"), "\144\x65\163\143\162\151\160\164\151\157\x6e" => sprintf(__("\122\x65\160\x6f\x72\164\x20\160\x61\143\x6b\x61\x67\145\x20\153\x65\x79\x20\141\163\40\141\40\143\165\x73\x74\157\155\x20\x66\151\145\x6c\x64\40\x66\x6f\162\40\45\163\x53\150\151\160\x53\164\x61\164\x69\157\x6e\45\163\x2e", $this->id), "\74\x61\40\x68\162\145\146\x3d\x22\x68\x74\x74\160\72\x2f\57\x62\151\x74\56\154\x79\x2f\x33\x32\x36\x55\101\x62\163\42\x20\x74\x61\x72\x67\145\x74\x3d\x22\137\142\x6c\141\156\153\x22\x3e", "\x3c\57\x61\x3e"), "\144\145\x66\x61\165\x6c\164" => "\156\157"], "\163\x68\x69\160\x53\164\x61\x74\151\157\x6e\103\165\x73\164\x6f\155\106\151\x65\x6c\x64" => ["\x74\x79\x70\145" => "\x73\x65\x6c\x65\x63\x74", "\x74\x69\164\x6c\145" => __("\123\150\x69\x70\123\x74\x61\164\151\157\x6e\x20\103\x75\x73\x74\x6f\155\40\106\x69\x65\154\x64", $this->id), "\x6f\160\x74\151\157\156\x73" => ["\143\x75\163\164\157\x6d\137\146\151\145\154\144\x5f\62" => __("\103\x75\x73\x74\x6f\155\x20\106\151\145\154\144\x20\x32", $this->id), "\x63\165\163\164\x6f\155\x5f\x66\x69\145\x6c\x64\137\63" => __("\x43\165\163\164\x6f\x6d\x20\x46\151\x65\154\x64\x20\63", $this->id) ], "\x64\145\163\143\x72\151\x70\x74\x69\157\156" => __("\131\x6f\x75\x20\x63\x61\156\40\165\x73\145\40\103\165\x73\164\157\x6d\40\x46\x69\x65\154\144\40\62\x20\157\x72\40\103\x75\163\x74\157\155\x20\x46\151\145\154\x64\x20\63\40\x66\157\x72\40\x69\156\x74\145\x67\162\x61\x74\151\x6f\x6e\x20\x77\151\x74\x68\40\x53\150\x69\x70\123\x74\141\x74\x69\157\156\56", $this->id), "\x64\x65\146\x61\165\x6c\164" => "\143\165\x73\164\157\x6d\137\146\x69\145\154\x64\x5f\x32"]] + array_slice($E5lgm, $XaDsN, count($E5lgm) - $XaDsN, true);
                                return $E5lgm;
                            }
                            public function onShipStationExportCustomField():
                                string {
                                    return "\137\x70\x61\143\153\x61\147\145\137\153\145\x79";
                                }
                                public function onSetCartPackages(array $sFlVt):
                                    void {
                                        $this->logger->debug(__FILE__, 386, "\x6f\x6e\123\x65\164\x43\x61\162\x74\120\x61\x63\153\x61\147\145\163\x3a\x20" . count($sFlVt));
                                        if ($this->settings["\163\150\x69\x70\x70\151\156\x67\x4d\x65\164\x68\x6f\144\x50\145\x72"] === "\x63\x61\x72\x74" && !empty($sFlVt[0]["\x72\x61\164\145\x73"])) {
                                            $this->logger->debug(__FILE__, 389, "\123\x68\x69\x70\x70\151\x6e\x67\x20\x6d\x65\x74\150\157\x64\x20\x73\145\154\x65\143\164\151\x6f\x6e\40\x69\163\x20\163\x65\164\40\x74\157\40\160\145\x72\x20\143\x61\x72\x74\54\40\x73\x6f\40\167\x65\40\x77\x69\154\x6c\x20\x75\x73\145\x20\x72\x61\164\x65\163\x20\x66\x72\157\x6d\x20\x74\150\x65\40\x66\151\x72\163\164\x20\160\x61\143\x6b\141\x67\x65\x20\146\x6f\x72\40\157\x74\150\x65\x72\40\x70\x61\143\x6b\141\147\145\163");
                                            $Vb7yL = WC()->session->get("\x63\150\157\163\145\156\x5f\163\150\151\160\x70\x69\x6e\x67\x5f\155\x65\x74\x68\x6f\144\163");
                                            $j4QTc = $Vb7yL[0];
                                            $IGh16 = [];
                                            foreach ($sFlVt[0]["\162\x61\x74\x65\x73"] as $tkufx => $OCgEe) {
                                                $OCgEe = clone $OCgEe;
                                                $OCgEe->cost = 0;
                                                $OCgEe->taxes = [];
                                                $IGh16[$tkufx] = $OCgEe;
                                                zaYOH:
                                                }
                                                O6ESy:
                                                    foreach ($sFlVt as $hb6ZD => $rWFN3) {
                                                        if (empty($rWFN3["\x72\x61\164\x65\163"]) && $rWFN3["\x6e\145\145\144\163\137\163\150\151\160\160\x69\x6e\147"]) {
                                                            $rWFN3["\162\141\x74\x65\x73"] = $IGh16;
                                                            $sFlVt[$hb6ZD] = $rWFN3;
                                                            $Vb7yL[$hb6ZD] = $j4QTc;
                                                        }
                                                        ez3du:
                                                        }
                                                        dcCSp:
                                                            WC()->session->set("\x63\x68\x6f\163\145\x6e\137\x73\150\151\x70\x70\x69\156\x67\137\x6d\x65\164\x68\157\144\x73", $Vb7yL);
                                                            $this->logger->debug(__FILE__, 415, "\x4e\x65\x77\40\x43\150\x6f\x73\145\156\x20\x53\150\x69\160\x70\151\156\x67\40\115\145\x74\150\157\144\x73\x3a\40" . print_r($Vb7yL, true));
                                                        }
                                                        $this->packages = $sFlVt;
                                                    }
                                                    public function onOrderClass(string $C9Es2, string $Vafde, int $Ao9xj):
                                                        string {
                                                            if ($Vafde !== "\x73\x68\x6f\160\137\157\x72\x64\x65\x72") {
                                                                return $C9Es2;
                                                            }
                                                            if (!$this->isMainOrder($Ao9xj)) {
                                                                return $C9Es2;
                                                            }
                                                            $this->logger->debug(__FILE__, 441, "\157\x6e\x4f\x72\x64\x65\162\x43\154\x61\163\x73\x3a\40{$Ao9xj}");
                                                            return __NAMESPACE__ . "\134\115\141\x69\x6e\117\x72\x64\145\x72";
                                                        }
                                                        public function onCanReduceOrderStock(bool $ejZZf, $BP_Lq):
                                                            bool {
                                                                $this->logger->debug(__FILE__, 455, "\157\156\x43\141\156\x52\x65\x64\165\143\145\x4f\162\x64\145\x72\x53\x74\157\x63\153");
                                                                if (is_int($BP_Lq)) {
                                                                    $BP_Lq = wc_get_order($BP_Lq);
                                                                }
                                                                if ($this->isMainOrder($BP_Lq->get_id())) {
                                                                    return false;
                                                                }
                                                                $this->logger->debug(__FILE__, 465, "\124\150\151\163\40\x69\x73\x20\156\157\x74\x20\164\x68\145\x20\155\141\151\x6e\x20\x6f\162\x64\145\x72\54\x20\163\x6f\x20\x73\153\151\x70\40\151\x74");
                                                                return $ejZZf;
                                                            }
                                                            public function onMainOrderStatusChanged(int $Ao9xj, string $Vxp02, string $N_hkN, WC_Order $BP_Lq):
                                                                void {
                                                                    $this->logger->debug(__FILE__, 481, "\x6f\156\x4d\x61\x69\156\x4f\x72\x64\145\162\x53\164\141\x74\165\163\x43\x68\x61\156\x67\x65\x64");
                                                                    if ($N_hkN === "\x63\141\x6e\143\x65\154\154\x65\x64") {
                                                                        $this->logger->debug(__FILE__, 484, "\x53\x6b\x69\x70\40\x63\x61\x6e\143\145\154\154\145\x64\40\163\x74\x61\164\x75\163");
                                                                        return;
                                                                    }
                                                                    $mpfHi = $this->getPackageOrders($Ao9xj);
                                                                    foreach ($mpfHi as $xFrjX) {
                                                                        $xFrjX->set_status($N_hkN);
                                                                        $xFrjX->save();
                                                                        RYgw0:
                                                                        }
                                                                        xsJq8:
                                                                        }
                                                                        public function onPaymentSuccessfulResult(array $bhH8x, int $Ao9xj):
                                                                            array {
                                                                                $BP_Lq = wc_get_order($Ao9xj);
                                                                                $LI1Ee = $BP_Lq->get_payment_method();
                                                                                if (is_object($BP_Lq) && $LI1Ee == "invoice") {
                                                                                    $this->logger->debug(__FILE__, 514, "\x50\141\x79\x6d\x65\156\x74\x20\x6d\x65\164\150\x6f\144\x20\111\x44\x3a\40{$LI1Ee}\40\167\141\x73\x20\165\163\x65\144\x2c\x20\x73\x6f\40\x77\145\x20\x63\x61\156\x20\143\x61\156\143\145\x6c\x6c\40\157\x72\x64\145\x72\x20\111\104\72\40{$Ao9xj}");
                                                                                    $this->setMainOrderAsCancelled($Ao9xj, $BP_Lq);
                                                                                }
                                                                                return $bhH8x;
                                                                            }
                                                                            public function setMainOrderAsCancelled(int $Ao9xj, WC_Order $BP_Lq):
                                                                                void {
                                                                                    $this->logger->debug(__FILE__, 530, "\163\145\x74\x4d\x61\x69\x6e\x4f\162\x64\x65\x72\101\163\x43\141\x6e\143\x65\154\x6c\x65\144");
                                                                                    if (empty($BP_Lq) || $BP_Lq->get_status() === "\x63\x61\x6e\x63\145\x6c\x6c\145\x64") {
                                                                                        $this->logger->debug(__FILE__, 533, "\117\x72\144\145\x72\40\x64\x6f\x65\163\40\x6e\157\x74\x20\x65\x78\151\x73\x74\x20\157\x72\x20\x63\x61\x6e\x63\145\154\154\145\x64\x2c\40\163\x6f\x20\163\153\151\x70\x20\x69\x74");
                                                                                        return;
                                                                                    }
                                                                                    $BP_Lq->update_status("\143\x61\x6e\143\145\154\154\145\x64");
                                                                                    $BP_Lq->save();
                                                                                    $n2Rul = get_post_meta($Ao9xj, "_package_order_ids", true);
                                                                                    if ($this->settings["\x74\x72\141\163\150\x4d\x61\151\x6e\x4f\162\144\x65\x72"] === "\171\145\163" && !empty($n2Rul)) {
                                                                                        wp_trash_post($Ao9xj);
                                                                                    }
                                                                                }
                                                                                public function onMainOrderRefunded(int $zegrr, array $aYSBD):
                                                                                    void {
                                                                                        if (empty($_POST["\162\145\x73\164\x6f\143\153\x5f\x72\145\x66\x75\x6e\144\145\x64\x5f\x69\x74\x65\155\163"]) || $_POST["\162\145\163\164\x6f\x63\x6b\137\x72\145\x66\165\156\x64\145\x64\x5f\x69\x74\145\155\163"] !== "\164\x72\165\x65") {
                                                                                            return;
                                                                                        }
                                                                                        if (empty($aYSBD["\157\x72\x64\x65\162\x5f\151\x64"]) || empty($aYSBD["\154\x69\156\x65\x5f\151\x74\145\x6d\x73"])) {
                                                                                            return;
                                                                                        }
                                                                                        $Ao9xj = $aYSBD["\x6f\162\x64\145\162\137\x69\144"];
                                                                                        $BP_Lq = wc_get_order($Ao9xj);
                                                                                        if (empty($BP_Lq)) {
                                                                                            return;
                                                                                        }
                                                                                        if (!$this->isMainOrder($Ao9xj)) {
                                                                                            return;
                                                                                        }
                                                                                        $BP_Lq->add_order_note("\x4d\141\x69\x6e\x20\117\162\144\145\162\x20\x68\141\163\40\x62\x65\x65\156\40\162\145\146\165\156\144\x65\144", false);
                                                                                        $pGK51 = $BP_Lq->get_items(["\154\x69\156\x65\x5f\x69\164\x65\x6d"]);
                                                                                        $B341z = $aYSBD["\154\x69\156\x65\137\x69\x74\x65\x6d\x73"];
                                                                                        foreach ($B341z as $xSCeE => $u86c2) {
                                                                                            if (isset($pGK51[$xSCeE])) {
                                                                                                $tWWaC = $pGK51[$xSCeE];
                                                                                                $zP4f2 = $BP_Lq->get_product_from_item($tWWaC);
                                                                                                if (!empty($zP4f2) && $zP4f2->exists() && $zP4f2->managing_stock()) {
                                                                                                    $ROtct = wc_stock_amount($zP4f2->stock);
                                                                                                    $huLMS = $zP4f2->increase_stock($u86c2["\161\x74\x79"]);
                                                                                                    $BP_Lq->add_order_note(sprintf(__("\111\164\x65\155\x20\43\x25\163\40\x73\x74\157\x63\153\x20\151\156\x63\x72\x65\x61\163\145\144\40\x66\x72\x6f\x6d\40\x25\x73\40\164\157\40\45\x73\x2e", "\167\157\157\x63\157\155\x6d\145\x72\143\x65"), $zP4f2->get_id(), $ROtct, $huLMS));
                                                                                                }
                                                                                            }
                                                                                            A2D7H:
                                                                                            }
                                                                                            sme2d:
                                                                                            }
                                                                                            public function onLocateTemplate(string $X5mGG, string $ror5t, string $P1O1q):
                                                                                                string {
                                                                                                    switch ($ror5t) {
                                                                                                        case "\x63\x68\x65\143\x6b\x6f\x75\x74\x2f\x74\x68\141\156\153\171\157\165\x2e\x70\x68\x70":
                                                                                                        case "\157\x72\144\145\x72\57\x6f\x72\x64\x65\162\55\144\x65\x74\141\x69\x6c\163\x2e\160\150\x70":
                                                                                                        case "\x6f\162\144\145\x72\57\x70\141\143\153\141\x67\145\55\x6f\x72\x64\x65\162\x2d\144\145\164\141\151\154\x73\56\x70\150\x70":
                                                                                                        case "\x6d\171\x61\143\x63\x6f\165\x6e\164\57\x6f\x72\144\x65\162\163\x2e\x70\x68\160":
                                                                                                            $X5mGG = $this->templatePath . $ror5t;
                                                                                                            $this->logger->debug(__FILE__, 619, "\x4f\x76\x65\162\x77\x72\151\x74\145\40\164\145\x6d\160\x6c\141\164\145\40\160\141\x74\x68\40\x74\x6f\x3a\40" . $X5mGG);
                                                                                                            gotow6TB4;
                                                                                                    }
                                                                                                    mHexU:
                                                                                                        w6TB4:
                                                                                                            return $X5mGG;
                                                                                                        }
                                                                                                        public function onThankYou(int $Ao9xj):
                                                                                                            int {
                                                                                                                $this->logger->debug(__FILE__, 634, "\x6f\x6e\124\x68\x61\x6e\x6b\131\x6f\x75\72\x20{$Ao9xj}");
                                                                                                                if (empty($Ao9xj)) {
                                                                                                                    return $Ao9xj;
                                                                                                                }
                                                                                                                $mpfHi = $this->getPackageOrders($Ao9xj);
                                                                                                                foreach ($mpfHi as $xFrjX) {
                                                                                                                    $xFrjX->set_customer_ip_address(WC_Geolocation::get_ip_address());
                                                                                                                    $xFrjX->save();
                                                                                                                    XAmQM:
                                                                                                                    }
                                                                                                                    NZUUy:
                                                                                                                        return $Ao9xj;
                                                                                                                    }
                                                                                                                    public function onPaymentComplete(int $Ao9xj):
                                                                                                                        void {
                                                                                                                            $this->logger->debug(__FILE__, 659, "\x6f\x6e\120\141\x79\155\145\156\164\103\x6f\x6d\x70\x6c\145\x74\x65\72\x20{$Ao9xj}");
                                                                                                                            $BP_Lq = wc_get_order($Ao9xj);
                                                                                                                            if (empty($BP_Lq)) {
                                                                                                                                $this->logger->debug(__FILE__, 663, "\117\162\x64\145\x72\40\x63\x61\156\x27\x74\40\x62\x65\40\x66\x6f\165\156\144\x2c\x20\163\x6f\40\x73\x6b\x69\160\x20\x69\x74");
                                                                                                                                return;
                                                                                                                            }
                                                                                                                            $mpfHi = $this->getPackageOrders($Ao9xj);
                                                                                                                            if (empty($mpfHi)) {
                                                                                                                                $this->logger->debug(__FILE__, 670, "\x54\x68\x69\x73\40\151\163\x20\156\157\164\x20\x74\150\145\40\155\x61\151\x6e\x20\x6f\x72\144\145\162\x2c\x20\x73\157\40\163\x6b\151\160\x20\x69\x74");
                                                                                                                                return;
                                                                                                                            }
                                                                                                                            $bZkgM = $BP_Lq->get_transaction_id();
                                                                                                                            $Wl8jQ = get_post_meta($Ao9xj, "\x5f\x6e\x65\145\x64\x73\137\x70\141\171\x6d\x65\156\164", true);
                                                                                                                            $this->logger->debug(__FILE__, 678, "\x50\141\171\155\145\x6e\164\40\164\x72\141\156\163\141\x63\x74\x69\x6f\x6e\x20\x69\x64\72\x20{$bZkgM}\x2c\x20\156\x65\x65\x64\x73\120\x61\171\x6d\x65\x6e\x74\x3a\40{$Wl8jQ}");
                                                                                                                            if ($Wl8jQ && empty($bZkgM)) {
                                                                                                                                $this->logger->debug(__FILE__, 682, "\x57\145\x20\x61\162\145\40\163\x74\x69\154\154\40\x61\x77\x61\x69\x74\x69\x6e\x67\40\146\x6f\162\x20\x74\x68\x65\40\x70\x61\171\x6d\145\156\x74");
                                                                                                                                return;
                                                                                                                            }
                                                                                                                            if (!empty($bZkgM)) {
                                                                                                                                $BP_Lq->add_order_note(sprintf(__("\x50\141\171\155\145\156\x74\x20\124\x72\x61\x6e\163\x61\143\164\x69\157\156\x20\111\x44\72\40\x25\x73", "\x77\157\x6f\x63\x6f\x6d\155\145\162\143\145"), $bZkgM), false);
                                                                                                                            }
                                                                                                                            $VqCkg = $BP_Lq->get_meta("\x5f\x73\x74\x72\151\x70\x65\x5f\x63\150\x61\x72\x67\145\x5f\x63\x61\x70\x74\x75\x72\x65\x64", true);
                                                                                                                            foreach ($mpfHi as $xFrjX) {
                                                                                                                                $this->logger->debug(__FILE__, 696, "\164\162\x69\x67\147\145\162\x20\160\141\171\155\x65\x6e\x74\137\143\x6f\x6d\160\154\x65\x74\145\40\157\x6e\x20\x6f\162\x64\145\162\x3a\x20" . $xFrjX->get_id() . "\x20\x77\x69\x74\150\x20\164\162\x61\x6e\x73\141\x63\164\x69\x6f\x6e\x20\151\144\x3a\40{$bZkgM}");
                                                                                                                                if ($VqCkg === "\x79\x65\163") {
                                                                                                                                    update_post_meta($xFrjX->get_id(), "\x5f\163\164\162\x69\x70\x65\x5f\x63\150\x61\x72\x67\145\x5f\143\x61\x70\x74\x75\162\x65\x64", $VqCkg);
                                                                                                                                }
                                                                                                                                $xFrjX->payment_complete($bZkgM);
                                                                                                                                if (!empty($bZkgM)) {
                                                                                                                                    update_post_meta($xFrjX->get_id(), "\x5f\x74\162\x61\x6e\163\x61\143\x74\151\157\x6e\x5f\x69\144", $bZkgM);
                                                                                                                                    $xFrjX->add_order_note(sprintf(__("\120\141\x79\155\145\x6e\164\x20\x54\x72\141\156\x73\141\143\x74\151\157\156\x20\x49\x44\x3a\40\x25\163", "\167\x6f\x6f\x63\157\155\x6d\x65\162\x63\145"), $bZkgM), false);
                                                                                                                                }
                                                                                                                                ERgB8:
                                                                                                                                }
                                                                                                                                oZNcD:
                                                                                                                                    $this->setMainOrderAsCancelled($Ao9xj, $BP_Lq);
                                                                                                                                }
                                                                                                                                public function onUpdateOrderMeta(int $Ao9xj, array $HaonC):
                                                                                                                                    void {
                                                                                                                                        $this->logger->debug(__FILE__, 723, "\x6f\x6e\x55\x70\x64\x61\164\145\x4f\162\x64\x65\x72\115\x65\x74\141\54\40\x6f\162\x64\145\162\x49\144\x3a\x20\45\x64", $Ao9xj);
                                                                                                                                        if (empty($Ao9xj)) {
                                                                                                                                            $this->logger->debug(__FILE__, 725, "\117\162\x64\x65\162\x20\x49\x44\x20\x69\x73\x20\145\155\x70\x74\x79\54\40\163\157\x20\x77\145\40\143\141\156\47\164\40\x63\157\156\x74\x69\156\x75\145");
                                                                                                                                            return;
                                                                                                                                        }
                                                                                                                                        $this->orderData = $this->getOrderData($HaonC);
                                                                                                                                        if (empty($this->orderData)) {
                                                                                                                                            $this->logger->debug(__FILE__, 732, "\x4e\157\40\157\x72\144\x65\x72\x20\x64\x61\x74\141\40\150\x61\166\x65\x20\142\145\145\x6e\x20\x66\x6f\165\156\x64\x2c\x20\x73\x6f\x20\167\145\x20\143\x61\156\x27\164\x20\x63\157\156\164\x69\156\x75\145");
                                                                                                                                            return;
                                                                                                                                        }
                                                                                                                                        if (count($this->orderData["\x70\x61\143\153\x61\x67\x65\x73"]) === 1) {
                                                                                                                                            $rWFN3 = reset($this->orderData["\x70\141\143\153\141\147\145\x73"]);
                                                                                                                                            $this->logger->debug(__FILE__, 742, "\x54\150\151\163\40\157\x72\x64\x65\162\40\x68\141\163\40\x6f\x6e\x6c\x79\40\x6f\156\x65\40\x70\141\143\153\141\147\145\x2c\40\163\x6f\40\152\165\163\164\x20\141\x64\144\x20\x70\141\143\153\141\147\145\40\x6b\x65\x79\x20\x74\x6f\40\x6d\x65\164\141\x3a\40" . $rWFN3["\x70\141\x63\153\141\147\x65\113\x65\171"]);
                                                                                                                                            update_post_meta($Ao9xj, "\137\160\x61\x63\153\141\147\x65\137\153\145\x79", $rWFN3["\x70\x61\x63\153\x61\147\x65\x4b\145\171"], true);
                                                                                                                                            return;
                                                                                                                                        }
                                                                                                                                        $mpfHi = $this->getPackageOrders($Ao9xj);
                                                                                                                                        if (empty($mpfHi)) {
                                                                                                                                            $mpfHi = $this->createPackageOrders($Ao9xj);
                                                                                                                                        }
                                                                                                                                        if (empty($mpfHi)) {
                                                                                                                                            $this->logger->debug(__FILE__, 755, "\125\156\x61\142\x6c\145\40\x74\x6f\40\x63\162\145\x61\164\145\40\160\141\x63\x6b\141\147\145\40\157\162\x64\145\162\x73");
                                                                                                                                        }
                                                                                                                                    }
                                                                                                                                    private function loadSettings():
                                                                                                                                        void {
                                                                                                                                            $this->settings = get_option($this->settingsOptionKey, []);
                                                                                                                                            $this->settings = array_replace_recursive(["\x73\150\x69\x70\x70\x69\156\x67\x4d\145\164\150\157\144\x50\145\x72" => "\x70\141\x63\153\141\147\x65", "\x65\x6e\141\142\x6c\145\120\141\x63\x6b\x61\147\x65\117\x72\144\145\x72\163" => "\156\157", "\144\145\x62\x75\x67" => "\156\x6f", "\x74\162\141\x73\x68\115\x61\x69\x6e\x4f\162\144\x65\162" => "\x6e\157", "\x6e\157\120\x61\x79\155\145\x6e\164\x46\x6f\162" => [], "\143\165\163\x74\157\155\x65\x72\116\157\164\145" => '', "\x61\x75\x74\x6f\103\165\163\164\x6f\155\x65\x72\116\157\x74\x65" => "\x6e\x6f", "\x6f\162\144\145\x72\x4e\x6f\164\x65\124\171\160\145" => '', "\x65\x6e\141\x62\x6c\x65\x53\x68\x69\160\123\164\x61\164\x69\157\156\x49\x6e\x74\145\147\162\141\164\x69\157\x6e" => "\x6e\157", "\163\x68\x69\160\x53\164\141\164\151\x6f\156\103\165\163\164\157\x6d\x46\151\145\154\144" => "\143\165\x73\x74\157\x6d\x5f\x66\x69\x65\x6c\x64\137\x32", $this->id . "\137\x6c\151\x63\x65\x6e\163\145\113\x65\171" => ''], $this->settings);
                                                                                                                                        }
                                                                                                                                        private function getOrderData(array $HaonC):
                                                                                                                                            array {
                                                                                                                                                $this->logger->debug(__FILE__, 790, "\147\x65\x74\117\162\144\145\162\104\x61\164\x61");
                                                                                                                                                $sFlVt = $this->packages;
                                                                                                                                                if (empty($sFlVt)) {
                                                                                                                                                    $sFlVt = WC()->shipping->get_packages();
                                                                                                                                                }
                                                                                                                                                if (empty($sFlVt)) {
                                                                                                                                                    $this->logger->debug(__FILE__, 798, "\103\x61\162\x74\40\144\157\x65\163\x20\156\157\x74\40\150\x61\x76\x65\x20\x61\156\x79\40\x70\141\x63\153\x61\147\145\x73");
                                                                                                                                                    return [];
                                                                                                                                                }
                                                                                                                                                foreach ($sFlVt as $hb6ZD => $rWFN3) {
                                                                                                                                                    $rWFN3["\160\x61\x63\x6b\141\x67\x65\111\144\x78"] = $hb6ZD;
                                                                                                                                                    $sFlVt[$hb6ZD] = $rWFN3;
                                                                                                                                                    Q22kf:
                                                                                                                                                    }
                                                                                                                                                    CvtRu:
                                                                                                                                                        $kOnUr = ["\160\141\143\153\x61\147\145\x73" => $sFlVt, "\143\165\163\x74\157\x6d\145\162\137\x69\144" => apply_filters("\x77\x6f\x6f\x63\157\x6d\155\x65\x72\x63\145\137\x63\x68\145\143\x6b\x6f\165\164\137\x63\165\163\x74\157\x6d\x65\x72\x5f\151\x64", get_current_user_id()), "\x63\x75\162\x72\145\x6e\143\x79" => get_woocommerce_currency(), "\x70\x72\x69\143\x65\163\x5f\x69\x6e\143\x6c\165\x64\145\137\164\x61\170" => "\x79\145\x73" === get_option("\167\157\x6f\x63\157\155\x6d\145\162\x63\x65\137\160\162\x69\x63\x65\x73\x5f\x69\x6e\143\154\x75\144\145\137\x74\141\170"), "\151\160\137\x61\144\x64\162\145\x73\x73" => WC_Geolocation::get_ip_address(), "\x75\x73\x65\162\x5f\141\x67\x65\156\164" => wc_get_user_agent(), "\x70\157\163\164\145\144" => $HaonC, "\x61\144\x64\162\145\163\x73" => ["\x62\151\154\154\x69\x6e\x67" => $this->getOrderAddress("\x62\151\154\154\x69\x6e\147", $HaonC), "\x73\150\x69\160\x70\x69\x6e\147" => $this->getOrderAddress("\163\x68\x69\x70\x70\151\156\147", $HaonC) ], "\143\141\x72\x74\x5f\150\x61\x73\x68" => md5(json_encode(wc_clean(WC()->cart->get_cart_for_session())) . WC()->cart->total), "\x63\x68\x6f\x73\x65\156\137\x73\x68\x69\160\160\x69\156\x67\137\x6d\x65\x74\x68\157\144\x73" => WC()->session->get("\143\150\x6f\163\x65\156\137\x73\150\x69\160\x70\x69\x6e\147\137\x6d\x65\x74\150\157\144\163"), "\x6e\145\x65\x64\163\x5f\x70\x61\x79\155\145\x6e\x74" => WC()->cart->needs_payment(), "\141\166\141\x69\154\x61\x62\x6c\145\137\160\x61\171\155\x65\x6e\164\137\147\141\x74\x65\167\x61\171\163" => WC()->payment_gateways->get_available_payment_gateways(), "\146\145\x65\x73" => WC()->cart->get_fees(), "\163\165\x62\x74\x6f\164\x61\154" => $this->getItemsSubTotal(WC()->cart->get_cart()), "\143\x61\x6c\143\x75\154\x61\164\145\x5f\x74\x61\x78" => wc_tax_enabled() && !WC()->cart->get_customer()->get_is_vat_exempt(), "\x63\165\x73\164\x6f\x6d\145\162" => WC()->customer, "\x70\x72\151\x63\145\163\x5f\x69\156\143\154\165\x64\145\x5f\164\141\170" => wc_prices_include_tax() ];
                                                                                                                                                        return $kOnUr;
                                                                                                                                                    }
                                                                                                                                                    private function getOrderAddress(string $jm5KG, array $HaonC):
                                                                                                                                                        array {
                                                                                                                                                            if (!in_array($jm5KG, ["\x73\x68\151\x70\160\x69\156\x67", "\x62\151\154\154\151\156\147"], true)) {
                                                                                                                                                                return false;
                                                                                                                                                            }
                                                                                                                                                            $iP6CN = ["\x66\151\162\x73\x74\137\x6e\x61\x6d\x65", "\x6c\141\x73\164\x5f\156\x61\x6d\x65", "\143\x6f\155\x70\141\156\171", "\141\144\144\162\145\163\x73\x5f\x31", "\141\x64\144\x72\x65\163\x73\137\x32", "\143\151\164\x79", "\163\164\141\x74\x65", "\x70\x6f\163\164\x63\x6f\144\145", "\143\157\x75\156\x74\x72\x79", "\145\155\141\151\x6c", "\160\150\x6f\x6e\x65"];
                                                                                                                                                            $JrnTm = [];
                                                                                                                                                            foreach ($iP6CN as $q8NDm) {
                                                                                                                                                                $tkufx = $jm5KG . "\x5f" . $q8NDm;
                                                                                                                                                                if (isset($HaonC[$tkufx])) {
                                                                                                                                                                    $JrnTm[$q8NDm] = wc_clean($HaonC[$tkufx]);
                                                                                                                                                                } else {
                                                                                                                                                                    $JrnTm[$q8NDm] = '';
                                                                                                                                                                }
                                                                                                                                                                RD1nL:
                                                                                                                                                                }
                                                                                                                                                                kHFIh:
                                                                                                                                                                    return $JrnTm;
                                                                                                                                                                }
                                                                                                                                                                private function setPackageAddress(WC_Order $BP_Lq):
                                                                                                                                                                    void {
                                                                                                                                                                        $this->logger->debug(__FILE__, 884, "\163\145\x74\120\x61\143\x6b\x61\x67\x65\x41\144\x64\x72\145\x73\x73\40" . print_r($this->orderData["\141\144\x64\x72\145\x73\163"], true));
                                                                                                                                                                        $BP_Lq->set_address($this->orderData["\x61\144\144\x72\145\163\163"]["\x62\x69\154\x6c\151\x6e\x67"], "\x62\x69\154\x6c\151\156\x67");
                                                                                                                                                                        $BP_Lq->set_address($this->orderData["\x61\x64\x64\x72\x65\163\x73"]["\x73\150\151\x70\x70\x69\x6e\147"], "\163\150\151\160\160\x69\156\x67");
                                                                                                                                                                    }
                                                                                                                                                                    private function getItemsSubTotal(array $pZuRI):
                                                                                                                                                                        float {
                                                                                                                                                                            if (empty($pZuRI)) {
                                                                                                                                                                                return 0;
                                                                                                                                                                            }
                                                                                                                                                                            $m5X9p = 0;
                                                                                                                                                                            foreach ($pZuRI as $t9Fuv) {
                                                                                                                                                                                $m5X9p+= $t9Fuv["\154\151\x6e\145\137\163\x75\142\164\157\164\x61\154"];
                                                                                                                                                                                s_DQa:
                                                                                                                                                                                }
                                                                                                                                                                                aU0Ar:
                                                                                                                                                                                    return $m5X9p;
                                                                                                                                                                                }
                                                                                                                                                                                private function addPackageFees(WC_Order $BP_Lq, array $rWFN3):
                                                                                                                                                                                    void {
                                                                                                                                                                                        $this->logger->debug(__FILE__, 920, "\x61\144\x64\x50\x61\x63\153\141\x67\145\106\145\145\x73");
                                                                                                                                                                                        $TJOZY = $this->orderData["\163\x75\x62\164\x6f\164\141\x6c"];
                                                                                                                                                                                        $wDBY0 = $this->getItemsSubTotal($rWFN3["\x63\x6f\x6e\x74\x65\x6e\x74\x73"]);
                                                                                                                                                                                        $this->logger->debug(__FILE__, 925, "\x43\141\162\164\40\x54\x6f\164\x61\154\72\x20{$TJOZY}\40\x7c\40\x50\x61\143\x6b\141\147\145\x20\123\x75\142\x54\157\164\x61\154\x3a\x20{$wDBY0}");
                                                                                                                                                                                        $oKFSY = $wDBY0 / $TJOZY;
                                                                                                                                                                                        foreach ($this->orderData["\146\x65\145\163"] as $dxIZj => $M9svJ) {
                                                                                                                                                                                            $this->logger->debug(__FILE__, 930, "\x4f\x72\144\x65\162\x20\x46\145\x65\x73\72\x20" . print_r($M9svJ, true));
                                                                                                                                                                                            $M9svJ = clone $M9svJ;
                                                                                                                                                                                            $M9svJ->amount*= $oKFSY;
                                                                                                                                                                                            $M9svJ->total*= $oKFSY;
                                                                                                                                                                                            $M9svJ->tax*= $oKFSY;
                                                                                                                                                                                            foreach ($M9svJ->tax_data as $tH2rt => $vmx_V) {
                                                                                                                                                                                                $M9svJ->tax_data[$tH2rt] = $vmx_V * $oKFSY;
                                                                                                                                                                                                SUwTu:
                                                                                                                                                                                                }
                                                                                                                                                                                                iJu1M:
                                                                                                                                                                                                    $this->logger->debug(__FILE__, 943, "\x50\141\143\153\141\147\x65\x20\106\145\x65\163\x3a\40" . print_r($M9svJ, true));
                                                                                                                                                                                                    $t9Fuv = new WC_Order_Item_Fee();
                                                                                                                                                                                                    $t9Fuv->legacy_fee = $M9svJ;
                                                                                                                                                                                                    $t9Fuv->legacy_fee_key = $dxIZj;
                                                                                                                                                                                                    $t9Fuv->set_props(["\156\141\155\x65" => $M9svJ->name, "\x74\141\170\137\143\154\x61\x73\163" => $M9svJ->taxable ? $M9svJ->tax_class : 0, "\x61\155\157\x75\x6e\x74" => $M9svJ->amount, "\164\x6f\x74\141\x6c" => $M9svJ->total, "\164\157\x74\x61\x6c\x5f\x74\141\x78" => $M9svJ->tax, "\x74\x61\x78\145\163" => ["\x74\x6f\164\141\154" => $M9svJ->tax_data]]);
                                                                                                                                                                                                    do_action("\167\157\x6f\143\x6f\155\155\x65\x72\143\145\137\x63\150\145\143\153\157\x75\x74\137\x63\162\x65\141\x74\x65\x5f\x6f\x72\144\x65\x72\x5f\146\x65\x65\x5f\151\x74\145\155", $t9Fuv, $dxIZj, $M9svJ, $BP_Lq);
                                                                                                                                                                                                    $BP_Lq->add_item($t9Fuv);
                                                                                                                                                                                                    $this->logger->debug(__FILE__, 966, "\106\x65\x65\40\x74\x6f\x74\x61\154\72\x20" . $M9svJ->total . "\54\40\x74\x61\x78\x3a\40" . $M9svJ->tax);
                                                                                                                                                                                                    $this->packageTotal+= $M9svJ->total + $M9svJ->tax;
                                                                                                                                                                                                    VHEHa:
                                                                                                                                                                                                    }
                                                                                                                                                                                                    mVneH:
                                                                                                                                                                                                    }
                                                                                                                                                                                                    private function addPackageTaxes(WC_Order $BP_Lq, array $rWFN3):
                                                                                                                                                                                                        void {
                                                                                                                                                                                                            $this->logger->debug(__FILE__, 982, "\x61\x64\x64\x50\141\143\153\141\147\145\124\x61\x78\x65\163");
                                                                                                                                                                                                            $clBIT = $this->getPackageTaxes($rWFN3);
                                                                                                                                                                                                            $this->logger->debug(__FILE__, 986, "\x50\141\143\153\x61\147\145\40\164\x61\170\x65\163\72\40" . print_r($clBIT, true));
                                                                                                                                                                                                            $VtWGi = 0;
                                                                                                                                                                                                            $mz6z3 = 0;
                                                                                                                                                                                                            foreach ($clBIT as $JdtyU) {
                                                                                                                                                                                                                $VtWGi+= $JdtyU["\164\141\170\x5f\x74\157\x74\141\154"];
                                                                                                                                                                                                                $mz6z3+= $JdtyU["\163\150\x69\160\160\x69\156\x67\x5f\x74\x61\170\x5f\x74\x6f\164\141\x6c"];
                                                                                                                                                                                                                $t9Fuv = new WC_Order_Item_Tax();
                                                                                                                                                                                                                $t9Fuv->set_props($JdtyU);
                                                                                                                                                                                                                do_action("\167\157\157\x63\157\155\155\x65\x72\x63\145\x5f\x63\150\x65\x63\153\157\x75\164\x5f\143\162\145\141\164\145\137\x6f\x72\x64\x65\162\x5f\164\141\x78\137\x69\x74\x65\x6d", $t9Fuv, $JdtyU["\162\x61\164\x65\x5f\x69\x64"], $BP_Lq);
                                                                                                                                                                                                                $BP_Lq->add_item($t9Fuv);
                                                                                                                                                                                                                dEbQZ:
                                                                                                                                                                                                                }
                                                                                                                                                                                                                pzo3b:
                                                                                                                                                                                                                    $this->logger->debug(__FILE__, 1004, "\103\x61\x72\x74\x20\x74\x61\x78\72\x20{$VtWGi}\54\x20\163\x68\151\160\x70\x69\156\147\40\x74\141\170\x3a\40{$mz6z3}");
                                                                                                                                                                                                                    $BP_Lq->set_cart_tax($VtWGi);
                                                                                                                                                                                                                    $BP_Lq->set_shipping_tax($mz6z3);
                                                                                                                                                                                                                }
                                                                                                                                                                                                                private function getPackageTaxes(array $rWFN3):
                                                                                                                                                                                                                    array {
                                                                                                                                                                                                                        if (empty($rWFN3)) {
                                                                                                                                                                                                                            return [];
                                                                                                                                                                                                                        }
                                                                                                                                                                                                                        $clBIT = [];
                                                                                                                                                                                                                        $pZuRI = $rWFN3["\x63\x6f\156\164\x65\x6e\164\163"];
                                                                                                                                                                                                                        foreach ($pZuRI as $t9Fuv) {
                                                                                                                                                                                                                            if (!empty($t9Fuv["\154\x69\156\145\137\164\141\170\137\144\141\164\141"]) && isset($t9Fuv["\x6c\151\156\145\137\164\x61\170\x5f\144\141\x74\141"]["\164\x6f\x74\141\154"])) {
                                                                                                                                                                                                                                $oosa6 = $t9Fuv["\154\x69\156\145\x5f\164\x61\170\x5f\x64\x61\164\141"]["\164\x6f\164\141\x6c"];
                                                                                                                                                                                                                                foreach ($oosa6 as $em2iD => $m5X9p) {
                                                                                                                                                                                                                                    if (empty($clBIT[$em2iD])) {
                                                                                                                                                                                                                                        $clBIT[$em2iD] = ["\162\141\164\x65\x5f\x69\144" => $em2iD, "\164\141\170\x5f\x74\157\x74\x61\x6c" => wc_round_tax_total($m5X9p), "\x73\x68\151\160\160\x69\x6e\147\x5f\164\141\x78\x5f\x74\157\164\x61\154" => 0, "\x72\x61\164\x65\137\x63\157\x64\145" => WC_Tax::get_rate_code($em2iD), "\154\141\x62\x65\x6c" => WC_Tax::get_rate_label($em2iD), "\x63\157\x6d\x70\157\165\x6e\144" => WC_Tax::is_compound($em2iD) ];
                                                                                                                                                                                                                                    } else {
                                                                                                                                                                                                                                        $clBIT[$em2iD]["\164\141\170\x5f\164\x6f\x74\x61\154"] = wc_round_tax_total($clBIT[$em2iD]["\x74\x61\170\137\x74\x6f\x74\141\x6c"] + $m5X9p);
                                                                                                                                                                                                                                    }
                                                                                                                                                                                                                                    XmpRh:
                                                                                                                                                                                                                                    }
                                                                                                                                                                                                                                    ZgM4S:
                                                                                                                                                                                                                                    }
                                                                                                                                                                                                                                    OtgMZ:
                                                                                                                                                                                                                                    }
                                                                                                                                                                                                                                    rV3jT:
                                                                                                                                                                                                                                        $hb6ZD = $rWFN3["\x70\141\143\153\x61\147\x65\x49\144\170"];
                                                                                                                                                                                                                                        $QAlf1 = $this->orderData["\x63\x68\157\x73\x65\x6e\137\x73\x68\x69\160\160\151\x6e\147\137\155\x65\164\150\x6f\x64\163"];
                                                                                                                                                                                                                                        $GzGLG = isset($QAlf1[$hb6ZD]) ? $rWFN3["\162\141\x74\145\163"][$QAlf1[$hb6ZD]] : null;
                                                                                                                                                                                                                                        if (isset($GzGLG) && !empty($GzGLG->taxes)) {
                                                                                                                                                                                                                                            $this->logger->debug(__FILE__, 1053, "\123\x68\x69\x70\160\x69\x6e\x67\40\164\141\170\145\x73\x3a\x20" . print_r($GzGLG->taxes, true));
                                                                                                                                                                                                                                            foreach ($GzGLG->taxes as $em2iD => $m5X9p) {
                                                                                                                                                                                                                                                if (empty($clBIT[$em2iD])) {
                                                                                                                                                                                                                                                    $clBIT[$em2iD] = ["\162\141\x74\145\x5f\151\x64" => $em2iD, "\164\x61\170\137\x74\157\x74\x61\154" => 0, "\163\150\x69\160\160\151\x6e\x67\137\x74\x61\170\137\164\157\164\x61\x6c" => wc_round_tax_total($m5X9p), "\x72\141\x74\145\137\x63\x6f\144\x65" => WC_Tax::get_rate_code($em2iD), "\154\x61\142\145\x6c" => WC_Tax::get_rate_label($em2iD), "\x63\157\x6d\160\157\165\x6e\144" => WC_Tax::is_compound($em2iD) ];
                                                                                                                                                                                                                                                } else {
                                                                                                                                                                                                                                                    $clBIT[$em2iD]["\x73\x68\151\160\x70\151\x6e\x67\x5f\164\141\x78\x5f\164\157\164\141\x6c"] = wc_round_tax_total($clBIT[$em2iD]["\x73\150\151\x70\x70\151\156\x67\x5f\164\141\x78\137\x74\x6f\x74\x61\154"] + $m5X9p);
                                                                                                                                                                                                                                                }
                                                                                                                                                                                                                                                Az2GC:
                                                                                                                                                                                                                                                }
                                                                                                                                                                                                                                                Ugwd1:
                                                                                                                                                                                                                                                }
                                                                                                                                                                                                                                                $TJOZY = $this->orderData["\163\165\142\164\157\164\141\x6c"];
                                                                                                                                                                                                                                                $wDBY0 = $this->getItemsSubTotal($rWFN3["\143\x6f\156\164\145\156\x74\163"]);
                                                                                                                                                                                                                                                $oKFSY = $wDBY0 / $TJOZY;
                                                                                                                                                                                                                                                foreach ($this->orderData["\x66\145\x65\x73"] as $M9svJ) {
                                                                                                                                                                                                                                                    $M9svJ = clone $M9svJ;
                                                                                                                                                                                                                                                    $M9svJ->tax*= $oKFSY;
                                                                                                                                                                                                                                                    foreach ($M9svJ->tax_data as $em2iD => $vmx_V) {
                                                                                                                                                                                                                                                        $GcoSc = $vmx_V * $oKFSY;
                                                                                                                                                                                                                                                        if (empty($clBIT[$em2iD])) {
                                                                                                                                                                                                                                                            $clBIT[$em2iD] = ["\162\141\x74\145\137\x69\144" => $em2iD, "\x74\x61\170\137\164\157\164\141\x6c" => $GcoSc, "\163\150\x69\160\160\151\x6e\x67\137\164\141\x78\137\x74\x6f\164\x61\154" => 0, "\x72\141\x74\x65\x5f\143\x6f\x64\145" => WC_Tax::get_rate_code($em2iD), "\154\x61\x62\x65\154" => WC_Tax::get_rate_label($em2iD), "\143\157\155\160\x6f\x75\156\x64" => WC_Tax::is_compound($em2iD) ];
                                                                                                                                                                                                                                                        } else {
                                                                                                                                                                                                                                                            $clBIT[$em2iD]["\x74\x61\170\x5f\x74\157\x74\141\x6c"] = wc_round_tax_total($clBIT[$em2iD]["\x74\141\x78\137\x74\x6f\164\x61\x6c"] + $GcoSc);
                                                                                                                                                                                                                                                        }
                                                                                                                                                                                                                                                        nKB8x:
                                                                                                                                                                                                                                                        }
                                                                                                                                                                                                                                                        CnIDF:
                                                                                                                                                                                                                                                            DUp8M:
                                                                                                                                                                                                                                                            }
                                                                                                                                                                                                                                                            vsk1w:
                                                                                                                                                                                                                                                                return $clBIT;
                                                                                                                                                                                                                                                            }
                                                                                                                                                                                                                                                            private function addPackageItems(WC_Order $BP_Lq, array $rWFN3):
                                                                                                                                                                                                                                                                void {
                                                                                                                                                                                                                                                                    $this->logger->debug(__FILE__, 1114, "\141\144\x64\120\x61\143\x6b\141\x67\x65\x49\x74\x65\155\x73");
                                                                                                                                                                                                                                                                    $KCTNg = $rWFN3["\x63\x6f\x6e\x74\x65\x6e\164\163"];
                                                                                                                                                                                                                                                                    foreach ($KCTNg as $afSkb => $P6uQS) {
                                                                                                                                                                                                                                                                        $this->addPackageItem($BP_Lq, $afSkb, $P6uQS);
                                                                                                                                                                                                                                                                        bCTIc:
                                                                                                                                                                                                                                                                        }
                                                                                                                                                                                                                                                                        Ago9m:
                                                                                                                                                                                                                                                                        }
                                                                                                                                                                                                                                                                        private function addPackageItem(WC_Order $BP_Lq, string $afSkb, array $P6uQS):
                                                                                                                                                                                                                                                                            void {
                                                                                                                                                                                                                                                                                $t9Fuv = apply_filters("\167\157\x6f\143\157\x6d\x6d\145\x72\143\145\x5f\x63\x68\x65\143\153\x6f\x75\164\x5f\x63\162\145\x61\164\145\x5f\157\x72\x64\145\x72\137\154\151\156\145\x5f\x69\164\x65\x6d\137\x6f\x62\x6a\x65\x63\164", new WC_Order_Item_Product(), $afSkb, $P6uQS, $BP_Lq);
                                                                                                                                                                                                                                                                                $zP4f2 = $P6uQS["\144\141\164\141"];
                                                                                                                                                                                                                                                                                $t9Fuv->legacy_values = $P6uQS;
                                                                                                                                                                                                                                                                                $t9Fuv->legacy_cart_itemKey = $afSkb;
                                                                                                                                                                                                                                                                                $t9Fuv->set_props(["\x71\x75\141\x6e\164\x69\164\171" => $P6uQS["\x71\165\x61\156\164\x69\x74\171"], "\x76\141\x72\x69\141\164\x69\157\156" => $P6uQS["\x76\x61\x72\x69\x61\164\151\x6f\x6e"], "\163\165\x62\x74\x6f\x74\x61\x6c" => $P6uQS["\154\x69\156\x65\137\163\x75\x62\x74\157\x74\141\x6c"], "\164\x6f\164\141\154" => $P6uQS["\x6c\151\156\145\137\x74\157\x74\141\154"], "\x73\165\142\164\x6f\164\141\x6c\x5f\164\141\170" => $P6uQS["\x6c\x69\156\145\137\163\x75\142\x74\157\164\141\154\137\x74\x61\170"], "\164\157\x74\x61\154\x5f\164\x61\x78" => $P6uQS["\154\x69\x6e\145\x5f\x74\x61\x78"], "\164\141\170\145\163" => $P6uQS["\154\151\x6e\x65\137\164\141\170\x5f\144\141\x74\x61"]]);
                                                                                                                                                                                                                                                                                if ($zP4f2) {
                                                                                                                                                                                                                                                                                    $t9Fuv->set_props(["\x6e\x61\155\x65" => $zP4f2->get_name(), "\x74\x61\170\x5f\143\x6c\x61\163\x73" => $zP4f2->get_tax_class(), "\160\162\x6f\144\x75\143\164\137\x69\x64" => $zP4f2->is_type("\166\141\x72\x69\141\164\151\157\156") ? $zP4f2->get_parent_id() : $zP4f2->get_id(), "\166\x61\162\x69\141\x74\x69\157\156\x5f\x69\x64" => $zP4f2->is_type("\166\x61\x72\151\141\164\151\157\x6e") ? $zP4f2->get_id() : 0]);
                                                                                                                                                                                                                                                                                }
                                                                                                                                                                                                                                                                                $t9Fuv->set_backorder_meta();
                                                                                                                                                                                                                                                                                do_action("\x77\x6f\157\143\157\155\x6d\145\162\x63\145\137\x63\150\145\x63\153\157\x75\164\x5f\x63\x72\145\x61\164\x65\x5f\x6f\x72\x64\x65\x72\137\154\x69\156\x65\x5f\151\x74\145\155", $t9Fuv, $afSkb, $P6uQS, $BP_Lq);
                                                                                                                                                                                                                                                                                $BP_Lq->add_item($t9Fuv);
                                                                                                                                                                                                                                                                                $this->logger->debug(__FILE__, 1175, "\120\141\143\x6b\141\x67\145\40\x69\x74\x65\x6d\x20\163\x75\x62\x74\157\164\141\x6c\x3a\40" . $P6uQS["\x6c\151\x6e\145\137\x73\165\142\x74\157\x74\x61\154"] . "\x2c\x20\164\x6f\x74\141\154\72\40" . $P6uQS["\x6c\x69\156\x65\x5f\164\x6f\x74\141\154"] . "\x2c\x20\x74\141\x78\72\40" . $P6uQS["\154\151\156\145\137\164\x61\170"]);
                                                                                                                                                                                                                                                                                $this->packageTotal+= $P6uQS["\x6c\151\x6e\145\137\x74\157\x74\141\154"] + $P6uQS["\x6c\151\x6e\145\137\164\x61\x78"];
                                                                                                                                                                                                                                                                            }
                                                                                                                                                                                                                                                                            private function setPackagePaymentMethod(WC_Order $BP_Lq):
                                                                                                                                                                                                                                                                                void {
                                                                                                                                                                                                                                                                                    $this->logger->debug(__FILE__, 1188, "\163\145\164\120\x61\143\153\x61\x67\x65\120\x61\x79\155\145\156\164\115\x65\164\150\157\x64");
                                                                                                                                                                                                                                                                                    $LI1Ee = '';
                                                                                                                                                                                                                                                                                    if ($this->orderData["\x6e\145\145\x64\163\x5f\160\141\x79\x6d\145\156\x74"]) {
                                                                                                                                                                                                                                                                                        $LGQHA = $this->orderData["\x61\166\141\x69\154\141\142\x6c\145\137\x70\141\171\x6d\145\x6e\164\137\x67\x61\164\145\167\141\171\x73"];
                                                                                                                                                                                                                                                                                        $KPEZ3 = $this->orderData["\x70\157\163\164\145\x64"]["\160\141\x79\x6d\145\x6e\x74\137\155\x65\x74\150\157\144"];
                                                                                                                                                                                                                                                                                        $this->logger->debug(__FILE__, 1197, "\120\x61\171\155\145\x6e\x74\40\155\145\x74\x68\x6f\x64\x20\111\x44\72\40{$KPEZ3}");
                                                                                                                                                                                                                                                                                        if (isset($LGQHA[$KPEZ3])) {
                                                                                                                                                                                                                                                                                            $LI1Ee = $LGQHA[$KPEZ3];
                                                                                                                                                                                                                                                                                            $LI1Ee->validate_fields();
                                                                                                                                                                                                                                                                                        } else {
                                                                                                                                                                                                                                                                                            $this->logger->debug(__FILE__, 1203, "\x49\156\x76\x61\154\151\144\40\x70\141\x79\x6d\145\x6e\x74\x20\x6d\x65\164\150\x6f\144");
                                                                                                                                                                                                                                                                                        }
                                                                                                                                                                                                                                                                                    }
                                                                                                                                                                                                                                                                                    $BP_Lq->set_payment_method($LI1Ee);
                                                                                                                                                                                                                                                                                }
                                                                                                                                                                                                                                                                                private function addPackageShippingRate(WC_Order $BP_Lq, array $rWFN3):
                                                                                                                                                                                                                                                                                    void {
                                                                                                                                                                                                                                                                                        $this->logger->debug(__FILE__, 1220, "\x61\144\x64\120\141\143\153\x61\x67\x65\x53\150\x69\160\x70\151\156\147\122\x61\x74\x65");
                                                                                                                                                                                                                                                                                        $hb6ZD = $rWFN3["\160\141\x63\x6b\141\147\x65\111\144\170"];
                                                                                                                                                                                                                                                                                        $QAlf1 = $this->orderData["\x63\x68\x6f\x73\x65\156\137\163\x68\151\160\160\x69\156\x67\137\x6d\x65\164\150\157\144\163"];
                                                                                                                                                                                                                                                                                        $this->logger->debug(__FILE__, 1225, "\x53\x68\x69\160\160\x69\x6e\147\x20\115\x65\164\x68\157\x64\163\72\40" . print_r($QAlf1, true));
                                                                                                                                                                                                                                                                                        $this->logger->debug(__FILE__, 1226, "\x50\x61\x63\x6b\x61\x67\145\x20\151\x6e\144\145\x78\x3a\x20" . $hb6ZD);
                                                                                                                                                                                                                                                                                        if (!isset($QAlf1[$hb6ZD])) {
                                                                                                                                                                                                                                                                                            $this->logger->debug(__FILE__, 1229, "\123\150\x69\x70\160\x69\156\147\x20\155\145\164\150\x6f\x64\40\151\163\x20\x6e\157\164\x20\x73\145\x74");
                                                                                                                                                                                                                                                                                            return;
                                                                                                                                                                                                                                                                                        }
                                                                                                                                                                                                                                                                                        if (empty($rWFN3["\x72\141\x74\145\163"][$QAlf1[$hb6ZD]])) {
                                                                                                                                                                                                                                                                                            $this->logger->debug(__FILE__, 1235, "\x53\x65\x6c\x65\143\164\145\144\40\x72\x61\164\x65\40\151\163\40\156\157\164\40\163\x65\x74");
                                                                                                                                                                                                                                                                                            return;
                                                                                                                                                                                                                                                                                        }
                                                                                                                                                                                                                                                                                        $GzGLG = $rWFN3["\162\x61\164\145\x73"][$QAlf1[$hb6ZD]];
                                                                                                                                                                                                                                                                                        $this->logger->debug(__FILE__, 1242, "\x53\150\151\160\160\x69\x6e\147\x20\x72\x61\164\145\x3a\40" . print_r($GzGLG, true));
                                                                                                                                                                                                                                                                                        $t9Fuv = new WC_Order_Item_Shipping();
                                                                                                                                                                                                                                                                                        $t9Fuv->legacy_package_key = $hb6ZD;
                                                                                                                                                                                                                                                                                        $t9Fuv->set_props(["\155\x65\x74\x68\x6f\144\137\x74\151\164\154\145" => $GzGLG->label, "\155\x65\x74\150\x6f\x64\x5f\x69\144" => $GzGLG->method_id, "\151\x6e\163\x74\141\156\143\x65\x5f\x69\x64" => $GzGLG->instance_id, "\x74\x6f\164\141\x6c" => wc_format_decimal($GzGLG->cost), "\x74\x61\170\x65\163" => ["\x74\x6f\x74\141\x6c" => $GzGLG->taxes]]);
                                                                                                                                                                                                                                                                                        foreach ($GzGLG->get_meta_data() as $tkufx => $Vq5tP) {
                                                                                                                                                                                                                                                                                            $t9Fuv->add_meta_data($tkufx, $Vq5tP, true);
                                                                                                                                                                                                                                                                                            NoGyT:
                                                                                                                                                                                                                                                                                            }
                                                                                                                                                                                                                                                                                            XjPhW:
                                                                                                                                                                                                                                                                                                do_action("\x77\x6f\157\x63\x6f\x6d\155\145\162\x63\x65\x5f\x63\x68\145\143\x6b\x6f\x75\164\x5f\143\x72\x65\x61\164\x65\x5f\x6f\162\x64\145\162\x5f\x73\150\151\160\160\x69\x6e\x67\137\151\164\145\x6d", $t9Fuv, $hb6ZD, $rWFN3, $BP_Lq);
                                                                                                                                                                                                                                                                                                $mz6z3 = 0;
                                                                                                                                                                                                                                                                                                if (!empty($GzGLG->taxes)) {
                                                                                                                                                                                                                                                                                                    $mz6z3 = wc_round_tax_total(array_sum(array_map("\167\143\137\x72\157\165\156\x64\137\x74\141\x78\137\164\157\164\x61\x6c", $GzGLG->taxes)));
                                                                                                                                                                                                                                                                                                }
                                                                                                                                                                                                                                                                                                $BP_Lq->add_item($t9Fuv);
                                                                                                                                                                                                                                                                                                $BP_Lq->set_shipping_total($GzGLG->cost);
                                                                                                                                                                                                                                                                                                $BP_Lq->set_shipping_tax($mz6z3);
                                                                                                                                                                                                                                                                                                $this->logger->debug(__FILE__, 1274, "\x53\150\151\160\160\151\156\x67\x20\164\x6f\164\141\154\x3a\40" . $GzGLG->cost . "\x2c\x20\164\141\x78\72\x20" . $mz6z3);
                                                                                                                                                                                                                                                                                                $this->packageTotal+= $GzGLG->cost + $mz6z3;
                                                                                                                                                                                                                                                                                            }
                                                                                                                                                                                                                                                                                            private function addPackageCoupons(WC_Order $BP_Lq, array $rWFN3):
                                                                                                                                                                                                                                                                                                void {
                                                                                                                                                                                                                                                                                                    $this->logger->debug(__FILE__, 1289, "\141\144\144\x50\141\143\x6b\141\x67\145\103\157\x75\160\x6f\x6e\163");
                                                                                                                                                                                                                                                                                                    $BP_Lq->save();
                                                                                                                                                                                                                                                                                                    $tacLo = 0;
                                                                                                                                                                                                                                                                                                    $xWAVc = 0;
                                                                                                                                                                                                                                                                                                    $DIvxp = new WC_Discounts($BP_Lq);
                                                                                                                                                                                                                                                                                                    foreach ($rWFN3["\x61\x70\160\154\151\x65\x64\137\143\x6f\x75\160\157\156\163"] as $NAWbE) {
                                                                                                                                                                                                                                                                                                        $this->logger->debug(__FILE__, 1300, "\141\x70\160\154\171\40\x63\157\165\x70\x6f\x6e\x3a\40{$NAWbE}");
                                                                                                                                                                                                                                                                                                        $DIvxp->apply_coupon(new WC_Coupon($NAWbE));
                                                                                                                                                                                                                                                                                                        MlIZa:
                                                                                                                                                                                                                                                                                                        }
                                                                                                                                                                                                                                                                                                        z8bjj:
                                                                                                                                                                                                                                                                                                            $pGK51 = $BP_Lq->get_items();
                                                                                                                                                                                                                                                                                                            $this->logger->debug(__FILE__, 1306, "\x4e\x75\155\x62\145\162\40\x6f\x66\40\x69\x74\145\155\x73\x20\x69\156\40\x74\x68\x65\40\157\162\144\x65\x72\x3a\x20" . count($pGK51));
                                                                                                                                                                                                                                                                                                            foreach ($DIvxp->get_discounts(false) as $NAWbE => $gSh82) {
                                                                                                                                                                                                                                                                                                                $HM4iA = $this->getCouponProps($DIvxp->get_items(), $gSh82);
                                                                                                                                                                                                                                                                                                                if (!empty($HM4iA)) {
                                                                                                                                                                                                                                                                                                                    $HM4iA["\x63\x6f\144\x65"] = $NAWbE;
                                                                                                                                                                                                                                                                                                                    $tacLo+= $HM4iA["\x64\151\163\x63\x6f\x75\x6e\x74"];
                                                                                                                                                                                                                                                                                                                    $xWAVc+= $HM4iA["\x64\151\163\x63\x6f\x75\x6e\164\137\164\141\x78"];
                                                                                                                                                                                                                                                                                                                    $this->addPackageCoupon($BP_Lq, $HM4iA);
                                                                                                                                                                                                                                                                                                                }
                                                                                                                                                                                                                                                                                                                KPWZX:
                                                                                                                                                                                                                                                                                                                }
                                                                                                                                                                                                                                                                                                                y7JF0:
                                                                                                                                                                                                                                                                                                                    $BP_Lq->set_discount_total($tacLo);
                                                                                                                                                                                                                                                                                                                    $BP_Lq->set_discount_tax($xWAVc);
                                                                                                                                                                                                                                                                                                                }
                                                                                                                                                                                                                                                                                                                private function addPackageCoupon(WC_Order $BP_Lq, array $HM4iA):
                                                                                                                                                                                                                                                                                                                    void {
                                                                                                                                                                                                                                                                                                                        $this->logger->debug(__FILE__, 1333, "\x61\144\144\120\141\143\153\141\147\x65\x43\157\165\x70\x6f\x6e\x3a\x20" . print_r($HM4iA, true));
                                                                                                                                                                                                                                                                                                                        $t9Fuv = new WC_Order_Item_Coupon();
                                                                                                                                                                                                                                                                                                                        $t9Fuv->set_props($HM4iA);
                                                                                                                                                                                                                                                                                                                        $xJfMD = new WC_Coupon($HM4iA["\143\x6f\x64\x65"]);
                                                                                                                                                                                                                                                                                                                        $OyNF2 = $xJfMD->get_data();
                                                                                                                                                                                                                                                                                                                        unset($OyNF2["\165\163\145\144\137\142\171"]);
                                                                                                                                                                                                                                                                                                                        $t9Fuv->add_meta_data("\x63\x6f\165\160\157\156\x5f\x64\x61\x74\141", $OyNF2);
                                                                                                                                                                                                                                                                                                                        do_action("\x77\x6f\157\143\x6f\155\x6d\145\162\143\145\x5f\x63\150\145\x63\153\157\x75\x74\137\x63\162\x65\141\164\x65\137\x6f\x72\x64\x65\162\x5f\143\x6f\x75\160\157\156\x5f\151\164\145\x6d", $t9Fuv, $HM4iA["\x63\x6f\144\x65"], $xJfMD, $BP_Lq);
                                                                                                                                                                                                                                                                                                                        $BP_Lq->add_item($t9Fuv);
                                                                                                                                                                                                                                                                                                                    }
                                                                                                                                                                                                                                                                                                                    private function getCouponProps(array $hlNO7, array $gSh82):
                                                                                                                                                                                                                                                                                                                        array {
                                                                                                                                                                                                                                                                                                                            $this->logger->debug(__FILE__, 1359, "\147\145\x74\103\x6f\165\x70\x6f\x6e\120\162\157\x70\x73\72\40" . count($hlNO7) . "\x2c\x20" . count($gSh82));
                                                                                                                                                                                                                                                                                                                            if (empty($hlNO7) || empty($gSh82)) {
                                                                                                                                                                                                                                                                                                                                $this->logger->debug(__FILE__, 1362, "\x57\145\40\x63\141\156\x27\x74\x20\143\157\x6e\164\x69\x6e\x75\145\40\x62\145\143\141\165\x73\145\x20\144\141\164\x61\40\141\162\x65\40\145\x6d\x70\x74\171");
                                                                                                                                                                                                                                                                                                                                return [];
                                                                                                                                                                                                                                                                                                                            }
                                                                                                                                                                                                                                                                                                                            $N25i5 = 0;
                                                                                                                                                                                                                                                                                                                            $pneh_ = 0;
                                                                                                                                                                                                                                                                                                                            $pPNrD = [];
                                                                                                                                                                                                                                                                                                                            foreach ($gSh82 as $wVOjQ => $nU7j3) {
                                                                                                                                                                                                                                                                                                                                $this->logger->debug(__FILE__, 1371, "\151\164\145\x6d\113\145\171\72\x20{$wVOjQ}\54\40\144\x69\163\143\157\x75\156\x74\72\x20{$nU7j3}");
                                                                                                                                                                                                                                                                                                                                $N25i5+= $nU7j3;
                                                                                                                                                                                                                                                                                                                                if ($this->orderData["\x63\141\154\143\165\x6c\x61\x74\x65\137\x74\141\x78"]) {
                                                                                                                                                                                                                                                                                                                                    $t9Fuv = $hlNO7[$wVOjQ];
                                                                                                                                                                                                                                                                                                                                    if ($t9Fuv->product->is_taxable()) {
                                                                                                                                                                                                                                                                                                                                        $Yev5C = $t9Fuv->product->get_tax_class();
                                                                                                                                                                                                                                                                                                                                        if (!isset($pPNrD[$Yev5C])) {
                                                                                                                                                                                                                                                                                                                                            $pPNrD[$Yev5C] = WC_Tax::get_rates($Yev5C, $this->orderData["\143\165\163\164\x6f\x6d\145\x72"]);
                                                                                                                                                                                                                                                                                                                                        }
                                                                                                                                                                                                                                                                                                                                        $L8iPo = wc_round_tax_total(array_sum(WC_Tax::calc_tax($nU7j3, $pPNrD[$Yev5C], $this->orderData["\160\162\x69\x63\x65\x73\137\x69\156\143\x6c\165\x64\145\x5f\x74\141\170"])), 0);
                                                                                                                                                                                                                                                                                                                                        $this->logger->debug(__FILE__, 1395, "\x69\164\x65\155\x44\151\x73\143\157\x75\x6e\164\x54\141\170\x3a\x20" . $L8iPo);
                                                                                                                                                                                                                                                                                                                                        $pneh_+= $L8iPo;
                                                                                                                                                                                                                                                                                                                                        if ($this->orderData["\160\162\x69\143\145\x73\137\151\156\143\154\165\x64\145\137\x74\x61\x78"]) {
                                                                                                                                                                                                                                                                                                                                            $N25i5-= $L8iPo;
                                                                                                                                                                                                                                                                                                                                        }
                                                                                                                                                                                                                                                                                                                                    }
                                                                                                                                                                                                                                                                                                                                }
                                                                                                                                                                                                                                                                                                                                dClru:
                                                                                                                                                                                                                                                                                                                                }
                                                                                                                                                                                                                                                                                                                                hNKyy:
                                                                                                                                                                                                                                                                                                                                    return ["\144\151\163\x63\x6f\x75\156\164" => $N25i5, "\144\151\x73\143\157\165\156\x74\137\164\141\x78" => $pneh_];
                                                                                                                                                                                                                                                                                                                                }
                                                                                                                                                                                                                                                                                                                                private function buildPackageOrder(WC_Order $BP_Lq, array $rWFN3):
                                                                                                                                                                                                                                                                                                                                    void {
                                                                                                                                                                                                                                                                                                                                        $this->logger->debug(__FILE__, 1423, "\142\165\x69\x6c\x64\120\141\x63\x6b\x61\x67\x65\x4f\162\x64\145\162");
                                                                                                                                                                                                                                                                                                                                        $this->packageTotal = 0;
                                                                                                                                                                                                                                                                                                                                        $this->setPackageAddress($BP_Lq);
                                                                                                                                                                                                                                                                                                                                        $this->setPackagePaymentMethod($BP_Lq);
                                                                                                                                                                                                                                                                                                                                        $this->addPackageShippingRate($BP_Lq, $rWFN3);
                                                                                                                                                                                                                                                                                                                                        $this->addPackageItems($BP_Lq, $rWFN3);
                                                                                                                                                                                                                                                                                                                                        $this->addPackageFees($BP_Lq, $rWFN3);
                                                                                                                                                                                                                                                                                                                                        $this->addPackageTaxes($BP_Lq, $rWFN3);
                                                                                                                                                                                                                                                                                                                                        $this->addPackageCoupons($BP_Lq, $rWFN3);
                                                                                                                                                                                                                                                                                                                                        $this->logger->debug(__FILE__, 1435, "\120\x61\x63\x6b\141\x67\x65\40\x54\157\164\141\154\72\x20" . $this->packageTotal);
                                                                                                                                                                                                                                                                                                                                        $BP_Lq->set_total(round($this->packageTotal, wc_get_price_decimals()));
                                                                                                                                                                                                                                                                                                                                        $Ao9xj = $BP_Lq->save();
                                                                                                                                                                                                                                                                                                                                        if (!empty($Ao9xj)) {
                                                                                                                                                                                                                                                                                                                                            update_post_meta($Ao9xj, "\x5f\x70\x61\143\x6b\141\147\145\137\153\x65\171", $rWFN3["\160\141\143\153\141\x67\x65\113\145\x79"], true);
                                                                                                                                                                                                                                                                                                                                            do_action("\167\x6f\157\x63\x6f\x6d\155\145\x72\143\145\x5f\x63\150\145\143\x6b\157\165\x74\137\x75\160\x64\141\x74\x65\137\x6f\x72\144\145\162\137\155\x65\164\x61", $Ao9xj, $this->orderData["\160\157\x73\164\x65\144"]);
                                                                                                                                                                                                                                                                                                                                        } else {
                                                                                                                                                                                                                                                                                                                                            $this->logger->debug(__FILE__, 1447, "\x55\x6e\x61\142\154\145\40\x74\x6f\40\163\x61\x76\145\x20\x70\141\143\153\x61\x67\145\40\x6f\x72\x64\145\x72");
                                                                                                                                                                                                                                                                                                                                        }
                                                                                                                                                                                                                                                                                                                                    }
                                                                                                                                                                                                                                                                                                                                    private function createBlankOrder():
                                                                                                                                                                                                                                                                                                                                        WC_Order {
                                                                                                                                                                                                                                                                                                                                            $this->logger->debug(__FILE__, 1458, "\x63\x72\x65\141\164\145\x42\x6c\141\156\x6b\x4f\162\x64\x65\162");
                                                                                                                                                                                                                                                                                                                                            $aYSBD = ["\163\164\x61\x74\165\x73" => apply_filters("\167\157\x6f\x63\x6f\155\x6d\x65\x72\143\145\x5f\x64\x65\146\x61\165\x6c\164\x5f\x6f\x72\x64\x65\x72\137\x73\x74\x61\x74\x75\163", "\160\x65\156\x64\151\x6e\x67"), "\143\165\x73\x74\x6f\x6d\145\162\137\x69\144" => $this->orderData["\143\x75\x73\x74\x6f\x6d\145\162\137\x69\x64"], "\143\x75\x73\x74\157\155\145\x72\x5f\x6e\157\164\145" => isset($this->orderData["\160\x6f\x73\x74\x65\x64"]["\x6f\x72\x64\145\162\x5f\x63\157\x6d\155\x65\156\164\163"]) ? $this->orderData["\x70\x6f\163\x74\x65\x64"]["\x6f\x72\x64\145\162\x5f\x63\x6f\155\155\145\x6e\x74\163"] : '', "\143\x61\x72\164\137\x68\x61\x73\x68" => $this->orderData["\x63\x61\162\164\x5f\150\141\163\x68"], "\143\162\x65\141\164\145\144\x5f\x76\x69\141" => "\143\x68\145\143\x6b\157\x75\164"];
                                                                                                                                                                                                                                                                                                                                            if (!empty($this->settings["\x63\165\163\x74\157\155\145\x72\116\x6f\164\145"])) {
                                                                                                                                                                                                                                                                                                                                                if (!empty($aYSBD["\x63\x75\x73\x74\x6f\x6d\x65\162\x5f\156\157\x74\145"])) {
                                                                                                                                                                                                                                                                                                                                                    $aYSBD["\143\165\163\x74\x6f\155\145\x72\137\x6e\x6f\x74\x65"].= "\12\xa";
                                                                                                                                                                                                                                                                                                                                                }
                                                                                                                                                                                                                                                                                                                                                $aYSBD["\143\x75\163\x74\157\155\145\x72\137\156\x6f\x74\x65"].= $this->settings["\143\165\163\164\157\155\145\x72\x4e\157\x74\x65"];
                                                                                                                                                                                                                                                                                                                                            }
                                                                                                                                                                                                                                                                                                                                            $BP_Lq = wc_create_order($aYSBD);
                                                                                                                                                                                                                                                                                                                                            $BP_Lq->set_currency($this->orderData["\143\165\x72\x72\145\156\x63\x79"]);
                                                                                                                                                                                                                                                                                                                                            $BP_Lq->set_prices_include_tax($this->orderData["\160\162\x69\x63\145\x73\x5f\151\156\x63\x6c\165\x64\145\137\x74\x61\x78"]);
                                                                                                                                                                                                                                                                                                                                            $BP_Lq->set_customer_ip_address($this->orderData["\x69\x70\x5f\141\144\144\162\145\x73\x73"]);
                                                                                                                                                                                                                                                                                                                                            $BP_Lq->set_customer_user_agent($this->orderData["\165\x73\145\162\x5f\141\x67\145\156\x74"]);
                                                                                                                                                                                                                                                                                                                                            $Ao9xj = $BP_Lq->get_id();
                                                                                                                                                                                                                                                                                                                                            $this->logger->debug(__FILE__, 1483, "\x4e\x65\x77\40\157\162\x64\x65\162\40\x49\104\x3a" . $Ao9xj);
                                                                                                                                                                                                                                                                                                                                            do_action("\x77\157\x6f\x63\x6f\x6d\155\145\x72\x63\145\137\156\x65\167\137\x6f\162\x64\145\162", $Ao9xj, $BP_Lq);
                                                                                                                                                                                                                                                                                                                                            return $BP_Lq;
                                                                                                                                                                                                                                                                                                                                        }
                                                                                                                                                                                                                                                                                                                                        private function isPackageOrder(int $Ao9xj):
                                                                                                                                                                                                                                                                                                                                            bool {
                                                                                                                                                                                                                                                                                                                                                $wZL9e = get_post_meta($Ao9xj, "\x5f\x6d\141\151\156\137\157\162\144\145\162\x5f\151\x64", true);
                                                                                                                                                                                                                                                                                                                                                if (!empty($wZL9e)) {
                                                                                                                                                                                                                                                                                                                                                    return true;
                                                                                                                                                                                                                                                                                                                                                }
                                                                                                                                                                                                                                                                                                                                                return false;
                                                                                                                                                                                                                                                                                                                                            }
                                                                                                                                                                                                                                                                                                                                            private function getPackageOrderIds(int $Ao9xj):
                                                                                                                                                                                                                                                                                                                                                array {
                                                                                                                                                                                                                                                                                                                                                    $n2Rul = get_post_meta($Ao9xj, "\137\160\141\143\x6b\x61\147\x65\x5f\x6f\x72\x64\x65\x72\x5f\x69\x64\163", true);
                                                                                                                                                                                                                                                                                                                                                    if (empty($n2Rul)) {
                                                                                                                                                                                                                                                                                                                                                        $this->logger->debug(__FILE__, 1517, "\116\157\x20\160\141\143\153\x61\x67\145\40\x6f\x72\x64\x65\162\163\x20\x68\141\166\x65\40\142\145\x65\x6e\x20\x66\157\x75\x6e\x64");
                                                                                                                                                                                                                                                                                                                                                        return [];
                                                                                                                                                                                                                                                                                                                                                    }
                                                                                                                                                                                                                                                                                                                                                    $this->logger->debug(__FILE__, 1521, "\x50\141\x63\153\x61\147\145\40\x6f\162\x64\x65\x72\40\151\144\x73\x3a\40" . implode("\54", $n2Rul));
                                                                                                                                                                                                                                                                                                                                                    return $n2Rul;
                                                                                                                                                                                                                                                                                                                                                }
                                                                                                                                                                                                                                                                                                                                                private function isMainOrder(int $Ao9xj):
                                                                                                                                                                                                                                                                                                                                                    bool {
                                                                                                                                                                                                                                                                                                                                                        return !empty($this->getPackageOrderIds($Ao9xj));
                                                                                                                                                                                                                                                                                                                                                    }
                                                                                                                                                                                                                                                                                                                                                    private function getPackageOrders(int $Ao9xj):
                                                                                                                                                                                                                                                                                                                                                        array {
                                                                                                                                                                                                                                                                                                                                                            $n2Rul = $this->getPackageOrderIds($Ao9xj);
                                                                                                                                                                                                                                                                                                                                                            $mpfHi = [];
                                                                                                                                                                                                                                                                                                                                                            foreach ($n2Rul as $US60j) {
                                                                                                                                                                                                                                                                                                                                                                $xFrjX = wc_get_order($US60j);
                                                                                                                                                                                                                                                                                                                                                                if (!empty($xFrjX)) {
                                                                                                                                                                                                                                                                                                                                                                    $mpfHi[] = $xFrjX;
                                                                                                                                                                                                                                                                                                                                                                }
                                                                                                                                                                                                                                                                                                                                                                uE0R4:
                                                                                                                                                                                                                                                                                                                                                                }
                                                                                                                                                                                                                                                                                                                                                                YfhSU:
                                                                                                                                                                                                                                                                                                                                                                    return $mpfHi;
                                                                                                                                                                                                                                                                                                                                                                }
                                                                                                                                                                                                                                                                                                                                                                private function createPackageOrders(int $Ao9xj):
                                                                                                                                                                                                                                                                                                                                                                    array {
                                                                                                                                                                                                                                                                                                                                                                        $this->logger->debug(__FILE__, 1568, "\x63\x72\145\141\164\145\x50\x61\x63\x6b\141\x67\x65\117\162\x64\145\162\x73\72\x20{$Ao9xj}");
                                                                                                                                                                                                                                                                                                                                                                        if (empty($this->orderData) || empty($this->orderData["\x70\141\143\x6b\x61\x67\x65\163"])) {
                                                                                                                                                                                                                                                                                                                                                                            $this->logger->debug(__FILE__, 1571, "\x4f\162\144\145\x72\x20\x64\141\164\x61\40\x61\162\x65\40\x6e\157\164\x20\x73\145\x74\x2c\x20\x73\x6f\40\x77\x65\40\143\141\156\x27\x74\x20\x63\x6f\156\x74\151\156\165\x65");
                                                                                                                                                                                                                                                                                                                                                                            return [];
                                                                                                                                                                                                                                                                                                                                                                        }
                                                                                                                                                                                                                                                                                                                                                                        if ($this->isPackageOrder($Ao9xj)) {
                                                                                                                                                                                                                                                                                                                                                                            $this->logger->debug(__FILE__, 1577, "\x49\164\40\x69\163\x20\141\x20\160\141\143\x6b\141\147\145\x20\157\x72\144\145\x72\x2c\x20\x73\x6f\x20\x77\x65\40\143\141\156\x27\164\40\143\x72\145\x61\164\145\40\x6d\157\162\x65\40\x70\141\x63\153\x61\x67\145\40\157\162\144\x65\x72\x73\40\x66\x6f\162\x20\x69\x74");
                                                                                                                                                                                                                                                                                                                                                                            return [];
                                                                                                                                                                                                                                                                                                                                                                        }
                                                                                                                                                                                                                                                                                                                                                                        $mpfHi = [];
                                                                                                                                                                                                                                                                                                                                                                        $n2Rul = [];
                                                                                                                                                                                                                                                                                                                                                                        try {
                                                                                                                                                                                                                                                                                                                                                                            wc_transaction_query("\163\164\x61\x72\x74");
                                                                                                                                                                                                                                                                                                                                                                            foreach ($this->orderData["\160\141\x63\153\x61\147\145\163"] as $hb6ZD => $rWFN3) {
                                                                                                                                                                                                                                                                                                                                                                                $this->logger->debug(__FILE__, 1590, "\x53\x68\151\160\160\151\x6e\147\40\160\x61\143\x6b\141\147\x65\x3a\40{$hb6ZD}\x2c\40" . $rWFN3["\x70\x61\x63\x6b\141\x67\145\x4b\x65\x79"]);
                                                                                                                                                                                                                                                                                                                                                                                $xFrjX = $this->createPackageOrder($Ao9xj, $rWFN3);
                                                                                                                                                                                                                                                                                                                                                                                if (!empty($xFrjX)) {
                                                                                                                                                                                                                                                                                                                                                                                    $mpfHi[] = $xFrjX;
                                                                                                                                                                                                                                                                                                                                                                                    $n2Rul[] = $xFrjX->get_id();
                                                                                                                                                                                                                                                                                                                                                                                }
                                                                                                                                                                                                                                                                                                                                                                                ZXanU:
                                                                                                                                                                                                                                                                                                                                                                                }
                                                                                                                                                                                                                                                                                                                                                                                rx4Vg:
                                                                                                                                                                                                                                                                                                                                                                                    wc_transaction_query("\x63\157\x6d\x6d\x69\164");
                                                                                                                                                                                                                                                                                                                                                                                }
                                                                                                                                                                                                                                                                                                                                                                                catch(Exception $eVtPG) {
                                                                                                                                                                                                                                                                                                                                                                                    wc_transaction_query("\162\157\x6c\x6c\142\x61\x63\x6b");
                                                                                                                                                                                                                                                                                                                                                                                    return new WP_Error("\x63\150\145\x63\x6b\157\165\164\x2d\x65\162\162\x6f\x72", $eVtPG->getMessage());
                                                                                                                                                                                                                                                                                                                                                                                }
                                                                                                                                                                                                                                                                                                                                                                                if (!empty($n2Rul)) {
                                                                                                                                                                                                                                                                                                                                                                                    $this->logger->debug(__FILE__, 1608, "\x61\x64\x64\x20\160\141\x63\x6b\141\147\145\x20\x6f\x72\144\x65\x72\x20\x69\x64\x73\40\x74\157\40\x6d\x65\x74\x61\x3a\x20" . implode("\54", $n2Rul));
                                                                                                                                                                                                                                                                                                                                                                                    update_post_meta($Ao9xj, "\137\x70\x61\x63\x6b\x61\147\145\137\157\162\x64\145\162\137\151\x64\163", $n2Rul);
                                                                                                                                                                                                                                                                                                                                                                                    update_post_meta($Ao9xj, "\x5f\x6e\x65\145\144\163\x5f\x70\x61\171\x6d\x65\x6e\164", $this->orderData["\156\145\x65\144\x73\x5f\x70\x61\171\155\x65\x6e\x74"]);
                                                                                                                                                                                                                                                                                                                                                                                    update_post_meta($Ao9xj, "\137\157\x72\144\x65\x72\137\163\x74\157\x63\x6b\x5f\162\x65\144\x75\143\145\x64", "\x31", true);
                                                                                                                                                                                                                                                                                                                                                                                    update_post_meta($Ao9xj, "\x5f\x77\x63\x5f\x70\x6f\x69\156\x74\x73\x5f\145\141\x72\156\x65\x64", "\x30", true);
                                                                                                                                                                                                                                                                                                                                                                                }
                                                                                                                                                                                                                                                                                                                                                                                $BP_Lq = wc_get_order($Ao9xj);
                                                                                                                                                                                                                                                                                                                                                                                if (is_object($BP_Lq)) {
                                                                                                                                                                                                                                                                                                                                                                                    $BP_Lq->add_order_note("\117\x72\144\145\x72\x20\150\x61\x73\x20\142\145\145\x6e\x20\x73\x70\154\x69\164\x20\151\x6e\x74\x6f\x20\164\x68\145\x20\146\157\154\x6c\x6f\x77\x69\x6e\x67\x20\x6f\x72\144\x65\x72\163\72\x20" . implode("\x2c", $n2Rul) . "\12\x45\141\x63\150\40\x6f\x66\40\x74\150\x65\x20\157\x72\144\x65\x72\x73\x20\167\151\x6c\x6c\40\142\145\x20\146\165\154\x66\151\x6c\154\x65\144\x20\x73\x65\x70\141\162\141\164\x65\154\x79", false);
                                                                                                                                                                                                                                                                                                                                                                                }
                                                                                                                                                                                                                                                                                                                                                                                return $mpfHi;
                                                                                                                                                                                                                                                                                                                                                                            }
                                                                                                                                                                                                                                                                                                                                                                            private function createPackageOrder(int $Ao9xj, array $rWFN3): ? WC_Order {
                                                                                                                                                                                                                                                                                                                                                                                    $xFrjX = $this->createBlankOrder();
                                                                                                                                                                                                                                                                                                                                                                                    if (empty($xFrjX)) {
                                                                                                                                                                                                                                                                                                                                                                                        return null;
                                                                                                                                                                                                                                                                                                                                                                                    }
                                                                                                                                                                                                                                                                                                                                                                                    update_post_meta($xFrjX->get_id(), "\137\155\x61\151\x6e\x5f\157\x72\x64\145\x72\137\151\144", $Ao9xj, true);
                                                                                                                                                                                                                                                                                                                                                                                    $this->buildPackageOrder($xFrjX, $rWFN3);
                                                                                                                                                                                                                                                                                                                                                                                    $this->addPackageOrderNote($xFrjX, $Ao9xj);
                                                                                                                                                                                                                                                                                                                                                                                    return $xFrjX;
                                                                                                                                                                                                                                                                                                                                                                                }
                                                                                                                                                                                                                                                                                                                                                                                private function addPackageOrderNote(WC_Order $xFrjX, int $wZL9e) : void {
                                                                                                                                                                                                                                                                                                                                                                                    $v9JKR = sprintf(__("\115\x61\x69\x6e\40\157\162\x64\145\x72\x20\111\104\x3a\x20\x25\144", "\x77\x6f\157\143\157\155\155\x65\162\x63\145"), $wZL9e);
                                                                                                                                                                                                                                                                                                                                                                                    $xFrjX->add_order_note($v9JKR, $this->settings["\157\162\x64\x65\x72\116\157\x74\x65\124\171\x70\145"] === "\143\165\x73\164\157\155\x65\x72");
                                                                                                                                                                                                                                                                                                                                                                                    if ($this->settings["\x61\x75\164\x6f\x43\165\163\164\x6f\155\145\162\116\x6f\164\x65"] === "\171\x65\163") {
                                                                                                                                                                                                                                                                                                                                                                                        $wrVzK = $xFrjX->get_customer_note();
                                                                                                                                                                                                                                                                                                                                                                                        if (!empty($wrVzK)) {
                                                                                                                                                                                                                                                                                                                                                                                            $wrVzK.= "\12\xa";
                                                                                                                                                                                                                                                                                                                                                                                        }
                                                                                                                                                                                                                                                                                                                                                                                        $wrVzK.= $v9JKR;
                                                                                                                                                                                                                                                                                                                                                                                        $xFrjX->set_customer_note($wrVzK);
                                                                                                                                                                                                                                                                                                                                                                                    }
                                                                                                                                                                                                                                                                                                                                                                                }
                                                                                                                                                                                                                                                                                                                                                                                private function getAvailablePaymentMethods():
                                                                                                                                                                                                                                                                                                                                                                                    array {
                                                                                                                                                                                                                                                                                                                                                                                        if (is_array(self::$availablePaymentGateways)) {
                                                                                                                                                                                                                                                                                                                                                                                            return self::$availablePaymentGateways;
                                                                                                                                                                                                                                                                                                                                                                                        }
                                                                                                                                                                                                                                                                                                                                                                                        self::$availablePaymentGateways = [];
                                                                                                                                                                                                                                                                                                                                                                                        $FYCJd = [];
                                                                                                                                                                                                                                                                                                                                                                                        if (class_exists("\127\x43\137\x50\x61\x79\x6d\x65\x6e\164\x5f\107\x61\x74\145\x77\x61\171\163")) {
                                                                                                                                                                                                                                                                                                                                                                                            $FYCJd = WC_Payment_Gateways::instance()->get_available_payment_gateways();
                                                                                                                                                                                                                                                                                                                                                                                        }
                                                                                                                                                                                                                                                                                                                                                                                        foreach ($FYCJd as $tkufx => $rPWk5) {
                                                                                                                                                                                                                                                                                                                                                                                            self::$availablePaymentGateways[$tkufx] = $rPWk5->get_method_title();
                                                                                                                                                                                                                                                                                                                                                                                            Oq5GL:
                                                                                                                                                                                                                                                                                                                                                                                            }
                                                                                                                                                                                                                                                                                                                                                                                            Jww37:
                                                                                                                                                                                                                                                                                                                                                                                                return self::$availablePaymentGateways;
                                                                                                                                                                                                                                                                                                                                                                                            }
                                                                                                                                                                                                                                                                                                                                                                                        }
?>

Function Calls

None

Variables

None

Stats

MD5 c060f352a4a234fabca726f807d35b0b
Eval Count 0
Decode Time 169 ms