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 /* Plugin Name: Boxtracked - Cotizador de envos Plugin URI: https://www.box..

Decoded Output download

<?php 
 
/* 
  Plugin Name: Boxtracked - Cotizador de envos 
  Plugin URI: https://www.boxtracked.com/ 
  Description: Cotizador de envos de boxtracked.com 
  Version: 3.3 
  Author: Nimach S.R.L. 
  Author URI: http://www.boxtracked.com/ 
 */ 
 
/** 
 * Check if WooCommerce is active 
 */ 
goto SuM5Q; ihxrH: add_action("woocommerce_checkout_update_order_review", "checkout_update_refresh_shipping_methods", 10, 1); goto ibLj_; zbLZm: $boxtracked_checkout_id = ''; goto EJHLC; EJHLC: add_action("init", "init_boxtracked_setcookie"); goto Rvfnl; OFXKe: function checkout_update_refresh_shipping_methods() { $packages = WC()->cart->get_shipping_packages(); foreach ($packages as $key => $value) { $shipping_session = "shipping_for_package_{$key}"; unset(WC()->session->{$shipping_session}); } WC()->cart->calculate_shipping(); } goto ihxrH; MSQz9: function get_post_sucursal($cp) { $cs = explode("|", wc_clean($_POST["sucursal"])); $carrier = $cs[0]; $id = $cs[1]; $setting_id = "woocommerce_boxtracked_shipping_method1_settings"; $settings = get_option($setting_id); $api_key = $settings["api_key"]; $url = "https://www.boxtracked.com/bt/app/woocommerce/plugin/callback/sucursal/?carrier={$carrier}&id={$id}&cp={$cp}&api_key={$api_key}"; $ret = json_decode(file_get_contents($url)); return $ret; } goto XXds0; rrP3I: function boxtracked_checkout_get($campo, $default) { global $boxtracked_checkout_id; $setting_id = "woocommerce_boxtracked_shipping_method1_settings"; $settings = get_option($setting_id); $api_key = $settings["api_key"]; $ret = file_get_contents("https://www.boxtracked.com/bt/app/woocommerce/plugin/callback/checkout/get.php?api_key={$api_key}&id_chk={$boxtracked_checkout_id}&campo={$campo}"); return $ret == '' ? $default : $ret; } goto fA4hh; Rvfnl: function init_boxtracked_setcookie() { global $boxtracked_checkout_id; $session = new WC_Session_Handler(); $cookie = $session->get_session_cookie(); $boxtracked_checkout_id = $cookie[0]; $setting_id = "woocommerce_boxtracked_shipping_method1_settings"; $settings = get_option($setting_id); $api_key = $settings["api_key"]; $domain = $_SERVER["HTTP_HOST"] != "localhost" ? $_SERVER["HTTP_HOST"] : false; return file_get_contents("https://www.boxtracked.com/bt/app/woocommerce/plugin/callback/checkout/init.php?api_key={$api_key}&id={$boxtracked_checkout_id}") == $boxtracked_checkout_id; } goto rrP3I; JvZAA: add_action("woocommerce_my_account_my_orders_column_boxtracked", "add_account_orders_column_rows"); goto TZsux; tVyV4: function add_custom_order_status_actions_button_css() { echo "<style>.printlabel::after { font-family: woocommerce; content: "\e005" !important;}</style>"; } goto zbLZm; Eo7yg: function guardar_campos_boxtracked($order_id) { $tipo = "PaP"; if (!empty($_POST["tipo_de_envio"])) { $tipo = wc_clean($_POST["tipo_de_envio"]); update_post_meta($order_id, "boxtracked_operativa", $tipo); } if ($tipo == "PaS") { if (!empty($_POST["sucursal"])) { $cs = explode("|", wc_clean($_POST["sucursal"])); $carrier = $cs[0]; $sucursal = $cs[1]; update_post_meta($order_id, "boxtracked_carrier", $carrier); update_post_meta($order_id, "boxtracked_sucursal", $sucursal); } } } goto MSQz9; B_ftO: add_filter("woocommerce_admin_order_actions", function ($actions, $order) { $setting_id = "woocommerce_boxtracked_shipping_method1_settings"; $settings = get_option($setting_id); $key = md5($settings["api_key"] . $order->id); $url = "https://www.boxtracked.com/bt/recursos/etiquetas/?woo=1&key=" . $key . "&delivery=" . $order->id . "&tipo=qr"; $actions["printlabel"] = array("action" => "printlabel", "url" => $url, "name" => "Imprimir etiqueta"); return $actions; }, 10, 2); goto WXmWe; O1H82: add_filter("woocommerce_account_orders_columns", "filter_woocommerce_account_orders_columns", 10, 1); goto JvZAA; XXds0: add_action("woocommerce_new_order", "action_woocommerce_new_order", 10, 2); goto NQYRe; TZsux: function add_account_orders_column_rows($order) { if (!isset($order)) { return; } $metodo = @array_shift($order->get_shipping_methods()); if (!(strpos($metodo["method_id"], "boxtracked_shipping_method") === false)) { $setting_id = "woocommerce_" . $metodo["method_id"] . "_settings"; $settings = get_option($setting_id); $api_key = $settings["api_key"]; echo "<a href="https://www.boxtracked.com/bt/app/tracking/custom/ecommerce/?auth=" . md5($api_key . $order->id) . "&t=woocommerce&id=" . $order->id . "" class="woocommerce-button button" target="_blank">Seguir envo</a>"; } } goto B_ftO; fA4hh: add_action("woocommerce_before_order_notes", "crear_campos_boxtracked"); goto pLLbC; pX7Ks: function crear_campos_boxtracked($checkout) { global $boxtracked_checkout_id; $setting_id = "woocommerce_boxtracked_shipping_method1_settings"; $settings = get_option($setting_id); $api_key = $settings["api_key"]; woocommerce_form_field("tipo_de_envio", array("type" => "select", "required" => true, "label" => "Tipo de envo", "options" => array("PaP" => "A domicilio", "PaS" => "Retiro en sucursal del correo (Ms Econmico)")), $checkout->get_value("tipo_de_envio")); woocommerce_form_field("sucursal", array("type" => "select", "required" => true, "label" => "Sucursal", "options" => array('' => '')), $checkout->get_value("sucursal")); echo "<div id="sucursal_nfo"></div>"; include __DIR__ . "/checkout_js.php"; } goto Eo7yg; pLLbC: add_action("woocommerce_checkout_update_order_meta", "guardar_campos_boxtracked"); goto pX7Ks; WXmWe: add_action("admin_head", "add_custom_order_status_actions_button_css"); goto tVyV4; SuM5Q: if (in_array("woocommerce/woocommerce.php", apply_filters("active_plugins", get_option("active_plugins")))) { function boxtracked_shipping_method1_init() { if (!class_exists("WC_Boxtracked_Shipping_Method1")) { class WC_Boxtracked_Shipping_Method1 extends WC_Shipping_Method { var $number = 1; public function init_form_fields() { $this->form_fields = array("api_key" => array("title" => __("API Key", "woocommerce"), "type" => "text", "description" => __("Ingresa ac tu clave API de conexin con boxtracked.com", "woocommerce"), "default" => __('', "woocommerce"), "desc_tip" => true), "codigo_ts" => array("title" => __("Tipo de servicio", "woocommerce"), "type" => "text", "description" => __("Ingresa ac el cdigo del tipo de servicio (Consultar con el proveedor)", "woocommerce"), "default" => __('', "woocommerce"), "desc_tip" => true), "redondeo" => array("title" => __("Redondear a decimales", "woocommerce"), "type" => "number", "description" => __("Ingrese la cantidad de decimales a los que desea redondear el importe", "woocommerce"), "default" => "2", "desc_tip" => true), "iva_inc" => array("title" => __("Cotizacin", "woocommerce"), "label" => __("I.V.A. Includo", "woocommerce"), "type" => "checkbox", "description" => '', "default" => "no"), "alertas" => array("title" => __("Al cotizar", "woocommerce"), "label" => __("Mostrar alertas", "woocommerce"), "type" => "checkbox", "description" => '', "default" => "no")); } public function __construct() { $this->id = "boxtracked_shipping_method" . $this->number; $this->method_title = __("Boxtracked (Mtodo " . $this->number . ")"); $this->method_description = __("<img src="https://www.boxtracked.com/bt/img/logo-220x70.png"><p>Plugin de conexin con boxtracked.com para la cotizacin de envos</p>"); $this->enabled = "yes"; $this->title = "Boxtracked (Mtodo " . $this->number . ")"; $this->init(); } function init() { $this->init_form_fields(); $this->init_settings(); add_action("woocommerce_update_options_shipping_" . $this->id, array($this, "process_admin_options")); } public function calculate_shipping($package = array()) { $api_key = $this->settings["api_key"]; $codigo_ts = $this->settings["codigo_ts"]; $iva_inc = $this->settings["iva_inc"]; $redondeo = $this->settings["redondeo"]; if ($api_key != '' && $codigo_ts != '') { $rate = $this->get_rate($api_key, $codigo_ts, $package, $iva_inc != "no", $redondeo); $this->add_rate($rate); } } private function get_envio($api_key, $package) { $datos = array("direccion" => '', "provincia" => '', "localidad" => '', "cp" => '', "kilos" => 0, "m3" => 0, "vd" => 0); $datos["direccion"] = $package["destination"]["address"]; $datos["provincia"] = $package["destination"]["state"]; $datos["localidad"] = $package["destination"]["city"]; $datos["cp"] = $package["destination"]["postcode"]; $datos["vd"] = $package["contents_cost"]; if ($datos["cp"] == '') { if ($this->setting["alertas"] == "yes") { wc_add_notice(__("Ingrese el cdigo postal para calcular el costo del envo"), "error"); } return false; } else { if ($datos["localidad"] == '') { if ($this->setting["alertas"] == "yes") { wc_add_notice(__("Ingrese la localidad para calcular el costo del envo"), "error"); } return false; } else { if ($datos["provincia"] == '') { if ($this->setting["alertas"] == "yes") { wc_add_notice(__("Ingrese la provincia para calcular el costo del envo"), "error"); } return false; } } } if (!is_numeric($datos["cp"])) { if ($this->setting["alertas"] == "yes") { wc_add_notice(__("El cdigo postal debe ser numrico"), "error"); } return false; } $validacion = $this->validar_provincia_cp($api_key, $datos["provincia"], $datos["cp"]); if ($validacion) { if (!$validacion->provincia) { if ($this->setting["alertas"] == "yes") { wc_add_notice(__("La provincia no es vlida"), "error"); } return false; } if (!$validacion->cp) { if ($this->setting["alertas"] == "yes") { wc_add_notice(__("El cdigo postal no es vlido"), "error"); } return false; } } else { if ($this->setting["alertas"] == "yes") { wc_add_notice(__("No se logr validar el cdigo postal"), "error"); } return false; } $contents = $package["contents"]; $kilos = 0; $m3 = 0; $weight_unit = get_option("woocommerce_weight_unit"); $dimension_unit = get_option("woocommerce_dimension_unit"); $configuraciones_de_bultos = $this->obtener_configuraciones_de_bultos($api_key); foreach ($contents as $content) { if (get_class($content["data"]) == "WC_Product_Variation") { $data = new WC_Product_Variation($content["data"]); } else { $data = new WC_Product_Simple($content["data"]); } $quantity = (double) $content["quantity"]; if ($quantity > 0) { $config = $this->get_configuracion_de_bultos($data->get_sku(), $configuraciones_de_bultos); if (!$config) { switch ($weight_unit) { case "kg": $kilos += (double) $data->weight * $quantity; break; case "g": $gramos = (double) $data->weight * $quantity; $kilos += $gramos / 1000; break; default: wc_add_notice(__("Unidad de peso no soportada por el cotizador"), "error"); return false; } switch ($dimension_unit) { case "m": $m3 += (double) ((double) $data->length * (double) $data->width * (double) $data->height) * $quantity; break; case "cm": $m3 += (double) ((double) $data->length / 100 * ((double) $data->width / 100) * ((double) $data->height / 100)) * $quantity; break; case "mm": $m3 += (double) ((double) $data->length / 1000 * ((double) $data->width / 1000) * ((double) $data->height / 1000)) * $quantity; break; default: wc_add_notice(__("Unidad de dimensin no soportada por el cotizador"), "error"); return false; } } else { if ($config->componentes) { $kilos += (double) $config->kg * $quantity; $m3 += (double) $config->m3 * $quantity; } else { $kg_uni = (double) $config->kg / $config->uni_x_bulto; $m3_uni = (double) $config->m3 / $config->uni_x_bulto; $kilos += $kg_uni * $quantity; $m3 += $m3_uni * $quantity; } } } } $datos["kilos"] = round($kilos, 2); $datos["m3"] = round($m3, 3); return $datos; } private function get_configuracion_de_bultos($sku, &$configuraciones) { if (!$configuraciones) { return; } foreach ($configuraciones as $config) { if ($config->sku == $sku) { return $config; } } } private function obtener_configuraciones_de_bultos($api_key) { try { return json_decode(file_get_contents("https://www.boxtracked.com/bt/app/woocommerce/plugin/callback/bultos/?api_key={$api_key}")); } catch (Exception $e) { return false; } } private function get_rate($api_key, $codigo_ts, $package, $iva_inc, $redondeo) { $url = "https://www.boxtracked.com/bt/app/woocommerce/plugin/callback/?api_key={$api_key}&codigo_ts={$codigo_ts}&iva_inc=" . ($iva_inc ? 1 : 0) . "&redondeo={$redondeo}"; global $boxtracked_checkout_id; if ($boxtracked_checkout_id) { $url .= "&id_chk={$boxtracked_checkout_id}"; } $datos_de_envio = $this->get_envio($api_key, $package); if (!$datos_de_envio) { return array(); } $url .= "&data=" . base64_encode(json_encode($datos_de_envio)); $rate = file_get_contents($url); if ($rate) { $rate = json_decode($rate); } else { $rate = array(); } return $rate; } private function validar_provincia_cp($api_key, $codigo_prv, $cp) { $url = "https://www.boxtracked.com/bt/app/woocommerce/plugin/callback/validar/?api_key={$api_key}&p={$codigo_prv}&c={$cp}"; $validacion = file_get_contents($url); if ($validacion) { return json_decode($validacion); } else { return false; } } } } } function boxtracked_shipping_method2_init() { if (!class_exists("WC_Boxtracked_Shipping_Method2")) { class WC_Boxtracked_Shipping_Method2 extends WC_Boxtracked_Shipping_Method1 { function __construct() { $this->number = 2; parent::__construct(); } } } } function boxtracked_shipping_method3_init() { if (!class_exists("WC_Boxtracked_Shipping_Method3")) { class WC_Boxtracked_Shipping_Method3 extends WC_Boxtracked_Shipping_Method1 { function __construct() { $this->number = 3; parent::__construct(); } } } } function boxtracked_shipping_method4_init() { if (!class_exists("WC_Boxtracked_Shipping_Method4")) { class WC_Boxtracked_Shipping_Method4 extends WC_Boxtracked_Shipping_Method1 { function __construct() { $this->number = 4; parent::__construct(); } } } } add_action("woocommerce_shipping_init", "boxtracked_shipping_method1_init"); add_action("woocommerce_shipping_init", "boxtracked_shipping_method2_init"); add_action("woocommerce_shipping_init", "boxtracked_shipping_method3_init"); add_action("woocommerce_shipping_init", "boxtracked_shipping_method4_init"); function add_boxtracked_shipping_method($methods, $number) { $methods["boxtracked_shipping_method" . $number] = "WC_Boxtracked_Shipping_Method" . $number; return $methods; } function add_boxtracked_shipping_method1($methods) { return add_boxtracked_shipping_method($methods, 1); } function add_boxtracked_shipping_method2($methods) { return add_boxtracked_shipping_method($methods, 2); } function add_boxtracked_shipping_method3($methods) { return add_boxtracked_shipping_method($methods, 3); } function add_boxtracked_shipping_method4($methods) { return add_boxtracked_shipping_method($methods, 4); } add_filter("woocommerce_shipping_methods", "add_boxtracked_shipping_method1"); add_filter("woocommerce_shipping_methods", "add_boxtracked_shipping_method2"); add_filter("woocommerce_shipping_methods", "add_boxtracked_shipping_method3"); add_filter("woocommerce_shipping_methods", "add_boxtracked_shipping_method4"); } goto OFXKe; ibLj_: function filter_woocommerce_account_orders_columns($columns) { $columns["boxtracked"] = __("Seguir envo", "woocommerce"); return $columns; } goto O1H82; NQYRe: function action_woocommerce_new_order($order_id, $order) { if ($_POST["tipo_de_envio"] == "PaS") { $sucursal = get_post_sucursal($order->get_billing_postcode()); if ($sucursal) { $address = array("first_name" => $order->get_billing_first_name(), "last_name" => $order->get_billing_last_name(), "company" => $order->get_billing_company(), "email" => $order->get_billing_email(), "phone" => $order->get_billing_phone(), "address_1" => $sucursal->direccion1, "address_2" => $sucursal->direccion2, "city" => $sucursal->localidad, "state" => $order->get_billing_state(), "postcode" => $order->get_billing_postcode(), "country" => $order->get_billing_country()); $order->set_address($address, "shipping"); } } } ?>

Did this file decode correctly?

Original Code

<?php

/*
  Plugin Name: Boxtracked - Cotizador de envos
  Plugin URI: https://www.boxtracked.com/
  Description: Cotizador de envos de boxtracked.com
  Version: 3.3
  Author: Nimach S.R.L.
  Author URI: http://www.boxtracked.com/
 */

/**
 * Check if WooCommerce is active
 */
goto SuM5Q; ihxrH: add_action("\167\157\x6f\143\157\155\x6d\x65\x72\x63\x65\137\x63\150\145\x63\x6b\157\x75\164\137\x75\160\x64\x61\164\145\137\157\162\144\x65\x72\137\162\145\166\x69\145\167", "\x63\150\145\x63\153\157\x75\164\137\x75\x70\x64\x61\164\145\137\162\145\146\x72\145\163\150\137\x73\150\151\x70\x70\x69\156\x67\137\x6d\x65\164\150\157\144\163", 10, 1); goto ibLj_; zbLZm: $boxtracked_checkout_id = ''; goto EJHLC; EJHLC: add_action("\x69\156\x69\x74", "\151\156\x69\164\x5f\142\x6f\170\164\x72\x61\143\153\145\144\137\x73\x65\164\x63\157\x6f\153\x69\x65"); goto Rvfnl; OFXKe: function checkout_update_refresh_shipping_methods() { $packages = WC()->cart->get_shipping_packages(); foreach ($packages as $key => $value) { $shipping_session = "\x73\x68\x69\160\x70\x69\x6e\147\x5f\146\x6f\162\x5f\160\141\x63\153\x61\147\x65\137{$key}"; unset(WC()->session->{$shipping_session}); } WC()->cart->calculate_shipping(); } goto ihxrH; MSQz9: function get_post_sucursal($cp) { $cs = explode("\174", wc_clean($_POST["\163\165\143\x75\x72\163\x61\154"])); $carrier = $cs[0]; $id = $cs[1]; $setting_id = "\x77\x6f\x6f\143\157\x6d\155\145\162\x63\145\137\x62\157\x78\164\162\x61\x63\153\x65\x64\x5f\x73\150\151\160\160\151\x6e\x67\x5f\x6d\x65\164\150\x6f\144\61\x5f\x73\145\164\164\151\x6e\x67\x73"; $settings = get_option($setting_id); $api_key = $settings["\141\160\151\x5f\153\x65\x79"]; $url = "\x68\x74\x74\x70\x73\x3a\x2f\57\167\x77\167\56\x62\157\170\x74\x72\141\x63\x6b\145\144\x2e\143\157\155\x2f\142\164\x2f\141\160\x70\57\x77\x6f\x6f\143\157\x6d\155\x65\x72\143\x65\x2f\160\154\165\147\x69\x6e\57\143\141\154\x6c\142\141\x63\153\57\163\165\143\165\162\163\x61\154\57\77\x63\x61\162\x72\151\145\162\x3d{$carrier}\x26\x69\144\x3d{$id}\x26\x63\x70\x3d{$cp}\x26\x61\x70\151\137\153\x65\x79\x3d{$api_key}"; $ret = json_decode(file_get_contents($url)); return $ret; } goto XXds0; rrP3I: function boxtracked_checkout_get($campo, $default) { global $boxtracked_checkout_id; $setting_id = "\x77\157\x6f\x63\x6f\155\x6d\x65\x72\143\x65\x5f\x62\x6f\x78\164\162\x61\143\153\145\144\137\163\150\x69\160\160\151\x6e\147\137\x6d\x65\164\x68\x6f\144\x31\137\163\x65\164\x74\151\156\147\x73"; $settings = get_option($setting_id); $api_key = $settings["\141\160\151\137\153\145\171"]; $ret = file_get_contents("\150\x74\164\160\x73\x3a\x2f\x2f\167\x77\x77\56\x62\x6f\x78\164\x72\x61\143\x6b\x65\x64\56\143\x6f\155\57\142\164\x2f\141\160\x70\x2f\167\x6f\x6f\x63\157\155\155\x65\x72\x63\145\57\x70\x6c\165\x67\x69\x6e\x2f\143\x61\x6c\x6c\x62\141\143\x6b\x2f\143\x68\145\143\x6b\157\x75\x74\57\147\x65\164\x2e\x70\x68\160\77\141\160\151\137\x6b\145\171\75{$api_key}\x26\x69\144\137\143\x68\153\75{$boxtracked_checkout_id}\46\x63\x61\x6d\x70\157\x3d{$campo}"); return $ret == '' ? $default : $ret; } goto fA4hh; Rvfnl: function init_boxtracked_setcookie() { global $boxtracked_checkout_id; $session = new WC_Session_Handler(); $cookie = $session->get_session_cookie(); $boxtracked_checkout_id = $cookie[0]; $setting_id = "\167\157\157\x63\x6f\155\155\145\162\143\145\137\142\x6f\170\164\162\x61\143\153\x65\x64\x5f\x73\150\x69\160\x70\151\156\x67\x5f\155\x65\164\150\x6f\x64\x31\x5f\x73\145\x74\164\151\156\x67\163"; $settings = get_option($setting_id); $api_key = $settings["\141\160\151\x5f\x6b\x65\171"]; $domain = $_SERVER["\x48\124\x54\120\x5f\x48\117\123\124"] != "\154\x6f\x63\141\x6c\x68\x6f\163\x74" ? $_SERVER["\x48\124\124\x50\137\110\x4f\x53\124"] : false; return file_get_contents("\150\x74\x74\x70\163\72\57\x2f\167\x77\x77\x2e\x62\157\x78\164\x72\x61\143\153\145\144\56\x63\157\155\57\x62\164\x2f\141\160\x70\x2f\x77\x6f\157\143\157\155\x6d\x65\x72\143\x65\x2f\160\154\x75\147\x69\156\57\x63\141\154\x6c\x62\x61\x63\x6b\57\143\x68\145\143\153\x6f\x75\x74\57\x69\x6e\151\164\56\160\150\160\x3f\x61\160\x69\137\153\145\171\75{$api_key}\x26\151\144\x3d{$boxtracked_checkout_id}") == $boxtracked_checkout_id; } goto rrP3I; JvZAA: add_action("\167\x6f\157\143\157\x6d\x6d\145\162\x63\x65\x5f\x6d\x79\x5f\141\143\x63\157\x75\x6e\x74\x5f\155\171\137\x6f\162\144\145\x72\163\137\143\157\x6c\x75\155\x6e\137\x62\157\170\x74\162\x61\143\153\145\144", "\x61\x64\x64\x5f\x61\x63\143\157\x75\x6e\164\137\x6f\x72\x64\x65\x72\x73\137\143\157\x6c\x75\x6d\156\137\162\x6f\x77\163"); goto TZsux; tVyV4: function add_custom_order_status_actions_button_css() { echo "\74\x73\164\171\x6c\x65\76\x2e\x70\x72\x69\156\164\154\141\142\x65\x6c\72\x3a\x61\146\x74\x65\162\40\x7b\x20\146\x6f\156\164\x2d\x66\141\x6d\x69\154\x79\x3a\40\x77\x6f\157\143\157\x6d\x6d\x65\x72\143\145\x3b\40\143\157\x6e\x74\145\156\164\x3a\x20\x22\x5c\145\x30\60\65\x22\x20\x21\x69\155\160\157\162\x74\x61\156\164\x3b\x7d\x3c\57\x73\x74\171\154\145\76"; } goto zbLZm; Eo7yg: function guardar_campos_boxtracked($order_id) { $tipo = "\120\x61\120"; if (!empty($_POST["\164\151\x70\157\137\x64\x65\x5f\145\x6e\x76\x69\x6f"])) { $tipo = wc_clean($_POST["\164\151\x70\x6f\137\x64\x65\x5f\145\x6e\166\x69\157"]); update_post_meta($order_id, "\x62\x6f\x78\x74\x72\x61\x63\x6b\x65\144\137\157\x70\145\x72\x61\164\151\166\141", $tipo); } if ($tipo == "\120\141\123") { if (!empty($_POST["\163\165\143\x75\x72\x73\141\154"])) { $cs = explode("\x7c", wc_clean($_POST["\163\165\143\x75\162\x73\141\x6c"])); $carrier = $cs[0]; $sucursal = $cs[1]; update_post_meta($order_id, "\x62\157\170\x74\162\141\143\x6b\145\144\x5f\x63\x61\162\162\x69\145\x72", $carrier); update_post_meta($order_id, "\x62\157\x78\x74\x72\141\x63\x6b\145\x64\x5f\163\x75\x63\165\x72\163\x61\x6c", $sucursal); } } } goto MSQz9; B_ftO: add_filter("\x77\x6f\x6f\x63\157\x6d\x6d\x65\162\x63\145\x5f\141\144\155\151\x6e\x5f\157\162\x64\x65\x72\x5f\x61\x63\x74\151\x6f\156\x73", function ($actions, $order) { $setting_id = "\x77\157\x6f\143\x6f\155\155\145\x72\143\x65\x5f\x62\x6f\170\x74\162\141\x63\153\x65\144\137\x73\150\x69\x70\x70\x69\x6e\x67\137\155\145\164\x68\157\x64\61\x5f\163\x65\x74\x74\151\x6e\147\x73"; $settings = get_option($setting_id); $key = md5($settings["\x61\160\151\137\x6b\x65\x79"] . $order->id); $url = "\x68\164\x74\160\x73\72\57\x2f\x77\x77\167\56\142\157\170\x74\162\141\143\153\x65\x64\x2e\143\157\x6d\x2f\142\x74\57\x72\145\143\x75\x72\163\x6f\163\57\145\x74\x69\161\165\x65\x74\x61\x73\x2f\77\x77\x6f\x6f\75\x31\x26\153\145\171\75" . $key . "\x26\144\x65\x6c\151\x76\145\x72\x79\x3d" . $order->id . "\46\164\x69\x70\157\75\x71\x72"; $actions["\x70\x72\151\x6e\x74\154\x61\x62\145\x6c"] = array("\141\x63\x74\151\157\156" => "\160\162\x69\156\x74\154\x61\142\x65\154", "\x75\x72\x6c" => $url, "\x6e\141\x6d\x65" => "\x49\155\160\x72\x69\155\151\x72\x20\x65\x74\x69\161\165\x65\164\x61"); return $actions; }, 10, 2); goto WXmWe; O1H82: add_filter("\167\x6f\157\x63\x6f\x6d\x6d\x65\x72\143\x65\137\141\x63\x63\x6f\x75\156\164\137\157\162\x64\145\162\x73\x5f\x63\157\154\x75\x6d\156\163", "\x66\x69\154\x74\145\x72\x5f\x77\x6f\x6f\x63\157\x6d\155\145\162\x63\x65\137\141\143\x63\157\165\156\x74\x5f\157\162\x64\x65\x72\x73\137\x63\x6f\x6c\x75\x6d\156\163", 10, 1); goto JvZAA; XXds0: add_action("\x77\x6f\157\143\x6f\x6d\x6d\145\x72\x63\145\137\x6e\145\x77\137\157\162\x64\145\162", "\141\143\x74\x69\157\x6e\137\167\157\157\143\x6f\155\x6d\x65\162\143\x65\x5f\156\145\167\x5f\157\x72\x64\x65\x72", 10, 2); goto NQYRe; TZsux: function add_account_orders_column_rows($order) { if (!isset($order)) { return; } $metodo = @array_shift($order->get_shipping_methods()); if (!(strpos($metodo["\155\x65\x74\150\x6f\x64\137\x69\x64"], "\x62\157\x78\x74\x72\x61\143\153\145\144\x5f\x73\x68\x69\160\x70\x69\x6e\147\137\x6d\145\x74\x68\157\144") === false)) { $setting_id = "\x77\x6f\157\x63\x6f\155\x6d\x65\x72\x63\145\137" . $metodo["\155\x65\x74\150\157\144\137\x69\144"] . "\137\x73\x65\x74\x74\x69\x6e\147\163"; $settings = get_option($setting_id); $api_key = $settings["\141\160\151\137\x6b\145\x79"]; echo "\x3c\x61\40\x68\162\145\146\x3d\42\150\164\164\x70\x73\72\57\x2f\167\x77\167\56\142\157\170\x74\x72\x61\x63\x6b\145\144\56\x63\157\155\57\142\x74\57\141\160\160\x2f\x74\x72\141\143\153\151\156\x67\57\143\x75\163\164\157\155\x2f\145\143\157\155\x6d\x65\162\143\145\x2f\x3f\141\x75\x74\150\75" . md5($api_key . $order->id) . "\46\x74\75\x77\x6f\157\x63\157\x6d\x6d\145\x72\143\x65\46\151\x64\75" . $order->id . "\x22\x20\143\154\x61\163\163\x3d\42\167\157\x6f\143\x6f\x6d\155\145\162\x63\145\x2d\142\x75\x74\x74\x6f\x6e\x20\142\x75\164\x74\x6f\156\x22\40\x74\141\162\x67\145\164\x3d\x22\x5f\x62\x6c\x61\156\153\42\76\x53\x65\147\165\x69\x72\x20\145\x6e\x76\xc3\xad\157\x3c\x2f\x61\x3e"; } } goto B_ftO; fA4hh: add_action("\167\157\x6f\143\x6f\x6d\155\x65\162\143\x65\137\142\145\x66\x6f\162\x65\137\157\162\x64\145\162\x5f\x6e\x6f\x74\145\x73", "\x63\x72\x65\141\162\x5f\143\141\155\x70\157\x73\x5f\142\x6f\170\164\162\141\x63\x6b\x65\144"); goto pLLbC; pX7Ks: function crear_campos_boxtracked($checkout) { global $boxtracked_checkout_id; $setting_id = "\167\x6f\x6f\143\157\155\155\x65\x72\143\x65\137\142\157\170\164\162\141\x63\153\x65\144\x5f\163\x68\151\160\160\x69\x6e\x67\x5f\155\145\x74\x68\157\144\61\x5f\163\145\x74\164\x69\x6e\147\163"; $settings = get_option($setting_id); $api_key = $settings["\141\160\x69\137\x6b\145\171"]; woocommerce_form_field("\x74\x69\160\157\137\x64\145\x5f\145\x6e\x76\151\157", array("\164\x79\160\x65" => "\163\x65\x6c\145\x63\x74", "\x72\x65\161\x75\x69\162\145\x64" => true, "\x6c\141\142\145\x6c" => "\x54\x69\x70\157\40\144\x65\x20\145\x6e\166\xc3\xad\x6f", "\x6f\160\x74\x69\x6f\156\163" => array("\x50\x61\120" => "\x41\40\144\x6f\155\x69\143\x69\x6c\x69\x6f", "\x50\x61\123" => "\x52\x65\x74\151\x72\x6f\x20\x65\x6e\x20\x73\x75\143\165\x72\163\141\154\x20\144\x65\x6c\40\x63\x6f\162\x72\145\157\x20\x28\115\xc3\241\163\40\105\x63\157\156\303\263\155\x69\143\157\x29")), $checkout->get_value("\164\x69\160\x6f\x5f\144\145\x5f\x65\156\166\x69\x6f")); woocommerce_form_field("\x73\x75\143\165\162\163\141\x6c", array("\164\171\160\x65" => "\x73\145\x6c\x65\x63\x74", "\162\x65\161\x75\151\162\145\x64" => true, "\154\141\x62\x65\154" => "\123\x75\x63\x75\x72\163\x61\154", "\x6f\x70\x74\x69\x6f\156\x73" => array('' => '')), $checkout->get_value("\163\x75\143\x75\x72\163\x61\x6c")); echo "\74\x64\x69\166\40\151\144\75\x22\x73\165\x63\165\162\163\x61\154\x5f\x6e\x66\157\x22\x3e\74\x2f\x64\x69\166\76"; include __DIR__ . "\x2f\x63\150\145\143\153\157\165\164\x5f\x6a\x73\56\160\150\160"; } goto Eo7yg; pLLbC: add_action("\167\x6f\157\143\x6f\155\x6d\x65\x72\x63\145\x5f\x63\150\x65\143\153\x6f\165\x74\x5f\x75\x70\144\x61\x74\x65\x5f\157\162\x64\145\x72\137\155\x65\x74\141", "\147\x75\x61\162\x64\141\162\137\143\141\155\160\157\x73\137\x62\x6f\170\164\162\141\x63\x6b\x65\x64"); goto pX7Ks; WXmWe: add_action("\x61\144\x6d\151\156\x5f\150\145\141\144", "\141\144\x64\x5f\x63\x75\x73\164\157\x6d\x5f\157\162\x64\x65\x72\137\x73\164\x61\164\165\x73\137\x61\x63\164\x69\x6f\x6e\163\x5f\x62\165\164\164\157\x6e\137\143\x73\163"); goto tVyV4; SuM5Q: if (in_array("\167\157\x6f\x63\x6f\x6d\x6d\x65\162\x63\x65\57\x77\x6f\157\143\157\155\x6d\145\162\x63\x65\56\x70\150\x70", apply_filters("\141\x63\x74\x69\166\x65\137\x70\154\x75\x67\151\156\x73", get_option("\141\143\x74\x69\166\x65\137\160\154\x75\147\151\156\x73")))) { function boxtracked_shipping_method1_init() { if (!class_exists("\x57\x43\x5f\x42\157\170\164\x72\x61\143\153\145\144\x5f\123\x68\151\160\160\x69\156\x67\137\115\145\164\150\157\144\61")) { class WC_Boxtracked_Shipping_Method1 extends WC_Shipping_Method { var $number = 1; public function init_form_fields() { $this->form_fields = array("\x61\x70\x69\x5f\x6b\145\171" => array("\164\151\x74\x6c\x65" => __("\x41\120\x49\40\x4b\x65\x79", "\x77\x6f\x6f\143\x6f\x6d\155\145\162\x63\x65"), "\164\171\160\x65" => "\164\x65\170\x74", "\144\x65\163\143\162\x69\160\x74\x69\157\156" => __("\x49\156\x67\162\x65\163\x61\x20\x61\x63\xc3\xa1\40\164\165\40\143\x6c\141\x76\x65\x20\x41\x50\x49\40\x64\145\x20\143\157\x6e\145\170\151\303\263\156\x20\x63\x6f\x6e\x20\x62\157\170\x74\162\141\x63\153\x65\x64\x2e\x63\x6f\155", "\x77\157\x6f\143\x6f\155\155\145\x72\x63\145"), "\144\x65\x66\141\x75\x6c\x74" => __('', "\167\x6f\157\x63\157\x6d\x6d\x65\x72\143\x65"), "\x64\145\163\143\137\x74\x69\x70" => true), "\x63\157\x64\x69\x67\x6f\x5f\x74\163" => array("\x74\x69\x74\154\x65" => __("\124\151\160\x6f\x20\x64\145\40\x73\x65\x72\166\x69\143\151\x6f", "\x77\x6f\157\143\157\x6d\x6d\x65\x72\143\x65"), "\164\x79\160\145" => "\x74\x65\170\164", "\x64\x65\163\143\162\151\160\164\x69\157\x6e" => __("\111\x6e\x67\x72\145\163\141\40\x61\143\303\241\x20\x65\x6c\40\143\xc3\xb3\144\x69\x67\x6f\x20\x64\x65\154\40\x74\151\160\157\x20\144\145\40\x73\x65\x72\166\151\x63\151\157\40\50\103\157\x6e\x73\x75\x6c\164\141\x72\40\143\157\x6e\x20\145\x6c\x20\160\x72\x6f\166\145\145\x64\x6f\x72\51", "\x77\x6f\157\143\x6f\x6d\x6d\x65\162\143\145"), "\144\145\146\141\x75\154\x74" => __('', "\x77\x6f\x6f\143\157\155\155\145\x72\143\145"), "\144\x65\163\x63\137\164\x69\x70" => true), "\162\145\x64\157\x6e\x64\145\157" => array("\164\x69\x74\154\145" => __("\x52\145\144\157\x6e\144\x65\141\162\x20\x61\x20\x64\x65\143\151\155\x61\154\145\x73", "\167\157\x6f\143\x6f\x6d\155\145\162\143\x65"), "\164\x79\x70\x65" => "\156\165\x6d\x62\x65\162", "\144\145\163\x63\x72\x69\160\164\151\157\x6e" => __("\111\x6e\147\x72\145\163\x65\40\154\141\x20\x63\x61\x6e\164\x69\144\141\144\x20\x64\x65\40\x64\145\143\x69\x6d\x61\x6c\x65\x73\40\141\40\154\157\163\x20\x71\x75\x65\x20\144\145\163\145\x61\x20\x72\145\x64\157\156\144\145\141\x72\40\x65\154\x20\151\155\x70\x6f\162\164\145", "\167\157\157\143\157\155\155\x65\162\143\145"), "\x64\x65\x66\141\x75\154\164" => "\x32", "\144\x65\163\143\x5f\164\x69\x70" => true), "\x69\166\x61\x5f\x69\x6e\143" => array("\x74\x69\164\x6c\145" => __("\103\157\x74\x69\x7a\x61\143\x69\303\263\156", "\167\157\157\x63\157\x6d\x6d\145\x72\x63\x65"), "\x6c\141\142\x65\154" => __("\111\x2e\126\x2e\x41\56\40\x49\156\143\x6c\x75\xc3\xad\144\157", "\167\x6f\157\143\x6f\155\155\x65\162\143\145"), "\x74\x79\x70\145" => "\143\x68\x65\x63\x6b\x62\x6f\x78", "\x64\145\163\x63\x72\x69\160\x74\151\157\156" => '', "\x64\x65\146\x61\x75\x6c\x74" => "\x6e\x6f"), "\x61\x6c\145\x72\164\141\x73" => array("\164\151\164\x6c\x65" => __("\x41\x6c\x20\143\x6f\164\151\x7a\x61\162", "\x77\157\x6f\143\x6f\155\x6d\x65\162\143\145"), "\154\141\x62\145\154" => __("\x4d\x6f\163\164\x72\141\x72\x20\x61\x6c\x65\x72\164\141\x73", "\x77\x6f\157\x63\x6f\155\x6d\x65\x72\x63\145"), "\x74\x79\160\x65" => "\x63\x68\x65\x63\153\x62\x6f\x78", "\144\x65\x73\x63\x72\x69\x70\x74\x69\157\x6e" => '', "\x64\x65\x66\141\x75\154\164" => "\x6e\157")); } public function __construct() { $this->id = "\x62\x6f\170\x74\162\x61\143\153\145\144\x5f\x73\150\151\160\160\x69\156\x67\137\155\145\164\x68\x6f\144" . $this->number; $this->method_title = __("\x42\x6f\170\164\162\141\143\153\145\144\40\x28\x4d\xc3\251\x74\157\144\157\x20" . $this->number . "\x29"); $this->method_description = __("\74\151\155\x67\40\x73\x72\x63\75\x22\x68\x74\x74\x70\163\x3a\x2f\57\x77\167\x77\x2e\x62\157\170\x74\x72\141\x63\x6b\145\144\56\143\x6f\155\57\142\164\57\x69\x6d\x67\x2f\154\x6f\x67\x6f\x2d\x32\x32\x30\170\x37\60\56\x70\x6e\147\x22\x3e\x3c\160\76\x50\154\165\147\151\x6e\40\144\x65\40\143\157\x6e\x65\170\151\xc3\263\x6e\x20\143\157\x6e\40\142\157\x78\164\162\x61\x63\153\145\144\56\x63\x6f\x6d\x20\160\x61\x72\141\40\x6c\141\40\x63\x6f\x74\x69\x7a\141\143\151\xc3\263\x6e\x20\144\145\40\x65\156\166\xc3\xad\157\x73\74\x2f\160\x3e"); $this->enabled = "\171\145\x73"; $this->title = "\x42\157\x78\x74\162\x61\x63\x6b\x65\x64\40\50\115\303\251\x74\157\x64\157\40" . $this->number . "\51"; $this->init(); } function init() { $this->init_form_fields(); $this->init_settings(); add_action("\x77\157\157\143\157\155\155\x65\x72\143\x65\137\165\x70\144\x61\x74\145\137\x6f\x70\x74\x69\x6f\156\163\x5f\163\150\151\160\160\151\x6e\147\x5f" . $this->id, array($this, "\160\x72\x6f\143\x65\163\x73\x5f\141\144\x6d\151\156\x5f\157\x70\164\x69\157\x6e\x73")); } public function calculate_shipping($package = array()) { $api_key = $this->settings["\x61\x70\x69\137\153\145\x79"]; $codigo_ts = $this->settings["\x63\157\144\x69\147\157\137\164\x73"]; $iva_inc = $this->settings["\151\166\141\137\151\156\x63"]; $redondeo = $this->settings["\162\145\144\x6f\156\144\x65\x6f"]; if ($api_key != '' && $codigo_ts != '') { $rate = $this->get_rate($api_key, $codigo_ts, $package, $iva_inc != "\x6e\x6f", $redondeo); $this->add_rate($rate); } } private function get_envio($api_key, $package) { $datos = array("\x64\x69\162\x65\x63\x63\x69\157\x6e" => '', "\x70\162\x6f\x76\151\x6e\143\x69\x61" => '', "\x6c\x6f\143\141\154\x69\x64\141\x64" => '', "\x63\160" => '', "\153\x69\154\157\163" => 0, "\x6d\x33" => 0, "\x76\144" => 0); $datos["\x64\x69\x72\145\143\143\x69\157\156"] = $package["\144\x65\x73\164\x69\156\141\x74\x69\157\x6e"]["\x61\144\x64\162\145\163\x73"]; $datos["\x70\x72\157\166\x69\156\143\151\141"] = $package["\x64\x65\x73\x74\151\156\x61\164\x69\157\156"]["\163\164\x61\x74\x65"]; $datos["\x6c\x6f\143\141\154\151\144\x61\x64"] = $package["\x64\x65\x73\x74\151\x6e\x61\x74\x69\x6f\156"]["\143\x69\164\171"]; $datos["\x63\160"] = $package["\144\x65\163\164\x69\156\x61\164\x69\157\x6e"]["\x70\x6f\x73\164\143\157\144\145"]; $datos["\166\x64"] = $package["\143\157\156\164\x65\x6e\164\163\x5f\x63\157\163\x74"]; if ($datos["\143\160"] == '') { if ($this->setting["\141\x6c\145\162\x74\x61\x73"] == "\171\145\x73") { wc_add_notice(__("\111\156\147\x72\145\163\x65\40\x65\154\40\143\303\xb3\144\151\147\157\40\x70\x6f\x73\164\x61\154\x20\x70\141\x72\x61\40\143\141\154\x63\165\154\141\162\x20\145\x6c\x20\x63\157\163\164\157\40\x64\x65\154\x20\145\x6e\166\303\255\x6f"), "\145\x72\x72\157\162"); } return false; } else { if ($datos["\154\x6f\143\x61\154\x69\144\141\144"] == '') { if ($this->setting["\141\x6c\145\162\x74\141\163"] == "\x79\145\163") { wc_add_notice(__("\x49\156\147\x72\145\163\145\40\154\x61\x20\x6c\x6f\x63\141\x6c\151\144\x61\144\40\x70\x61\x72\141\x20\x63\x61\154\143\x75\x6c\141\162\40\145\x6c\x20\x63\x6f\163\164\157\40\144\x65\x6c\x20\145\x6e\166\xc3\255\157"), "\x65\x72\162\x6f\162"); } return false; } else { if ($datos["\160\x72\157\x76\x69\x6e\x63\151\141"] == '') { if ($this->setting["\141\154\x65\x72\x74\x61\x73"] == "\171\x65\x73") { wc_add_notice(__("\x49\156\x67\162\x65\x73\145\x20\154\x61\x20\x70\x72\x6f\166\151\x6e\143\151\x61\x20\x70\x61\162\x61\40\143\141\154\x63\165\154\141\162\x20\x65\154\40\x63\x6f\x73\164\157\40\x64\145\154\x20\145\156\x76\xc3\255\157"), "\145\162\x72\157\x72"); } return false; } } } if (!is_numeric($datos["\143\160"])) { if ($this->setting["\141\154\x65\162\x74\x61\x73"] == "\x79\x65\x73") { wc_add_notice(__("\105\154\40\143\303\263\x64\x69\147\x6f\x20\x70\157\163\x74\141\x6c\x20\144\x65\142\x65\x20\163\145\x72\40\156\165\155\303\xa9\162\151\143\157"), "\x65\x72\162\x6f\x72"); } return false; } $validacion = $this->validar_provincia_cp($api_key, $datos["\x70\x72\157\166\x69\156\x63\x69\x61"], $datos["\x63\x70"]); if ($validacion) { if (!$validacion->provincia) { if ($this->setting["\141\x6c\x65\x72\164\141\x73"] == "\x79\145\163") { wc_add_notice(__("\114\141\x20\160\x72\x6f\x76\151\x6e\x63\x69\141\40\x6e\157\40\x65\163\40\x76\xc3\xa1\154\151\x64\141"), "\x65\162\x72\157\162"); } return false; } if (!$validacion->cp) { if ($this->setting["\141\x6c\145\x72\x74\141\x73"] == "\171\x65\163") { wc_add_notice(__("\105\x6c\40\x63\303\xb3\144\x69\x67\x6f\40\160\x6f\163\x74\141\154\40\x6e\157\40\145\163\x20\x76\303\xa1\x6c\151\144\x6f"), "\145\162\162\157\162"); } return false; } } else { if ($this->setting["\x61\x6c\x65\162\x74\141\163"] == "\x79\x65\163") { wc_add_notice(__("\x4e\x6f\x20\163\145\x20\x6c\x6f\147\162\303\xb3\x20\166\x61\154\151\x64\x61\x72\40\x65\154\x20\x63\303\xb3\x64\x69\147\x6f\40\x70\x6f\x73\164\x61\x6c"), "\x65\162\162\157\x72"); } return false; } $contents = $package["\x63\x6f\x6e\164\145\x6e\x74\163"]; $kilos = 0; $m3 = 0; $weight_unit = get_option("\x77\157\157\143\157\x6d\155\x65\x72\x63\145\x5f\x77\x65\151\147\150\x74\x5f\x75\156\151\164"); $dimension_unit = get_option("\x77\157\x6f\x63\x6f\x6d\155\145\x72\143\x65\137\x64\151\x6d\x65\x6e\x73\x69\157\x6e\137\x75\156\x69\164"); $configuraciones_de_bultos = $this->obtener_configuraciones_de_bultos($api_key); foreach ($contents as $content) { if (get_class($content["\x64\x61\164\x61"]) == "\127\103\137\120\x72\x6f\144\x75\x63\164\x5f\x56\x61\162\151\x61\x74\x69\x6f\156") { $data = new WC_Product_Variation($content["\x64\x61\164\141"]); } else { $data = new WC_Product_Simple($content["\x64\141\164\x61"]); } $quantity = (double) $content["\x71\165\141\x6e\x74\151\164\x79"]; if ($quantity > 0) { $config = $this->get_configuracion_de_bultos($data->get_sku(), $configuraciones_de_bultos); if (!$config) { switch ($weight_unit) { case "\x6b\147": $kilos += (double) $data->weight * $quantity; break; case "\147": $gramos = (double) $data->weight * $quantity; $kilos += $gramos / 1000; break; default: wc_add_notice(__("\125\x6e\x69\144\x61\144\40\144\x65\x20\x70\145\x73\157\40\156\x6f\40\163\157\160\157\162\x74\x61\144\x61\40\x70\157\162\40\x65\154\x20\x63\x6f\x74\151\172\x61\144\157\162"), "\x65\162\162\x6f\162"); return false; } switch ($dimension_unit) { case "\x6d": $m3 += (double) ((double) $data->length * (double) $data->width * (double) $data->height) * $quantity; break; case "\x63\x6d": $m3 += (double) ((double) $data->length / 100 * ((double) $data->width / 100) * ((double) $data->height / 100)) * $quantity; break; case "\x6d\x6d": $m3 += (double) ((double) $data->length / 1000 * ((double) $data->width / 1000) * ((double) $data->height / 1000)) * $quantity; break; default: wc_add_notice(__("\x55\156\151\144\x61\x64\x20\144\145\40\144\x69\x6d\145\x6e\x73\151\xc3\263\x6e\x20\x6e\x6f\x20\x73\157\160\157\162\164\141\x64\x61\40\160\157\162\x20\145\x6c\40\x63\157\x74\151\x7a\141\x64\157\x72"), "\x65\162\162\x6f\x72"); return false; } } else { if ($config->componentes) { $kilos += (double) $config->kg * $quantity; $m3 += (double) $config->m3 * $quantity; } else { $kg_uni = (double) $config->kg / $config->uni_x_bulto; $m3_uni = (double) $config->m3 / $config->uni_x_bulto; $kilos += $kg_uni * $quantity; $m3 += $m3_uni * $quantity; } } } } $datos["\x6b\151\154\157\163"] = round($kilos, 2); $datos["\x6d\63"] = round($m3, 3); return $datos; } private function get_configuracion_de_bultos($sku, &$configuraciones) { if (!$configuraciones) { return; } foreach ($configuraciones as $config) { if ($config->sku == $sku) { return $config; } } } private function obtener_configuraciones_de_bultos($api_key) { try { return json_decode(file_get_contents("\150\164\164\160\163\72\57\57\x77\167\167\56\x62\157\x78\x74\162\x61\143\153\145\x64\56\x63\157\155\57\x62\x74\x2f\141\160\160\57\167\157\157\143\157\x6d\x6d\x65\x72\143\x65\57\160\154\x75\x67\x69\x6e\57\x63\x61\x6c\x6c\142\x61\x63\x6b\x2f\x62\165\x6c\x74\157\x73\57\x3f\x61\x70\151\x5f\x6b\145\x79\75{$api_key}")); } catch (Exception $e) { return false; } } private function get_rate($api_key, $codigo_ts, $package, $iva_inc, $redondeo) { $url = "\x68\164\164\160\163\x3a\57\x2f\x77\167\x77\56\142\157\170\x74\x72\141\143\153\145\144\56\x63\x6f\155\x2f\142\x74\57\141\160\x70\x2f\x77\157\x6f\x63\x6f\155\x6d\145\x72\x63\x65\x2f\160\x6c\165\x67\151\156\x2f\x63\x61\x6c\154\142\x61\x63\153\x2f\x3f\141\160\151\137\x6b\x65\171\75{$api_key}\46\x63\x6f\x64\151\147\157\x5f\164\163\75{$codigo_ts}\x26\151\x76\141\x5f\151\x6e\x63\x3d" . ($iva_inc ? 1 : 0) . "\46\x72\x65\x64\x6f\x6e\x64\x65\x6f\x3d{$redondeo}"; global $boxtracked_checkout_id; if ($boxtracked_checkout_id) { $url .= "\x26\x69\144\137\143\150\153\75{$boxtracked_checkout_id}"; } $datos_de_envio = $this->get_envio($api_key, $package); if (!$datos_de_envio) { return array(); } $url .= "\x26\x64\x61\164\x61\75" . base64_encode(json_encode($datos_de_envio)); $rate = file_get_contents($url); if ($rate) { $rate = json_decode($rate); } else { $rate = array(); } return $rate; } private function validar_provincia_cp($api_key, $codigo_prv, $cp) { $url = "\x68\x74\164\160\x73\72\57\57\167\167\x77\x2e\x62\x6f\x78\164\x72\141\143\x6b\x65\x64\x2e\x63\x6f\x6d\57\x62\x74\57\141\160\160\57\x77\x6f\x6f\143\157\x6d\x6d\145\x72\x63\x65\x2f\x70\154\x75\x67\x69\x6e\57\x63\141\x6c\x6c\x62\x61\143\x6b\57\x76\x61\154\x69\144\141\162\x2f\x3f\141\x70\x69\x5f\x6b\x65\171\75{$api_key}\x26\x70\x3d{$codigo_prv}\46\143\75{$cp}"; $validacion = file_get_contents($url); if ($validacion) { return json_decode($validacion); } else { return false; } } } } } function boxtracked_shipping_method2_init() { if (!class_exists("\x57\103\137\102\157\170\164\x72\x61\x63\x6b\x65\144\x5f\123\x68\151\x70\x70\151\x6e\x67\137\x4d\x65\164\x68\157\x64\x32")) { class WC_Boxtracked_Shipping_Method2 extends WC_Boxtracked_Shipping_Method1 { function __construct() { $this->number = 2; parent::__construct(); } } } } function boxtracked_shipping_method3_init() { if (!class_exists("\x57\x43\137\102\x6f\x78\164\162\x61\x63\153\x65\x64\137\123\150\151\160\x70\151\x6e\147\137\115\145\x74\150\157\x64\x33")) { class WC_Boxtracked_Shipping_Method3 extends WC_Boxtracked_Shipping_Method1 { function __construct() { $this->number = 3; parent::__construct(); } } } } function boxtracked_shipping_method4_init() { if (!class_exists("\x57\x43\137\x42\157\x78\164\x72\141\143\x6b\145\144\x5f\123\150\151\160\x70\151\156\147\x5f\115\x65\164\x68\x6f\144\64")) { class WC_Boxtracked_Shipping_Method4 extends WC_Boxtracked_Shipping_Method1 { function __construct() { $this->number = 4; parent::__construct(); } } } } add_action("\x77\157\x6f\x63\157\155\155\x65\x72\143\x65\x5f\x73\150\151\160\160\x69\156\x67\137\x69\156\x69\164", "\x62\157\170\164\x72\141\143\153\145\x64\137\x73\150\x69\x70\160\x69\156\147\137\x6d\145\164\x68\x6f\x64\61\x5f\x69\x6e\151\164"); add_action("\x77\x6f\157\x63\157\x6d\155\x65\x72\x63\145\x5f\163\150\x69\160\x70\151\x6e\x67\x5f\x69\x6e\151\x74", "\x62\x6f\x78\164\162\141\143\153\x65\144\137\163\x68\151\160\160\x69\156\x67\x5f\x6d\145\x74\150\157\144\62\x5f\151\156\151\164"); add_action("\x77\157\x6f\143\x6f\155\155\145\162\143\145\137\163\150\151\160\x70\151\156\147\x5f\151\156\151\164", "\x62\x6f\170\164\x72\141\143\x6b\x65\144\x5f\x73\150\151\160\x70\151\x6e\147\x5f\155\x65\164\150\157\x64\x33\x5f\151\x6e\151\x74"); add_action("\167\157\157\x63\x6f\155\155\x65\162\x63\x65\x5f\163\x68\x69\x70\x70\151\x6e\x67\x5f\x69\156\151\x74", "\142\157\170\164\x72\x61\143\153\145\x64\x5f\163\x68\x69\x70\x70\x69\156\x67\x5f\155\145\164\x68\x6f\144\64\137\x69\x6e\151\164"); function add_boxtracked_shipping_method($methods, $number) { $methods["\x62\157\170\x74\162\141\x63\153\145\144\x5f\163\150\151\x70\x70\x69\156\x67\137\x6d\x65\x74\x68\x6f\x64" . $number] = "\x57\103\x5f\102\x6f\x78\164\x72\141\143\x6b\x65\x64\x5f\x53\150\x69\160\x70\151\x6e\147\x5f\115\x65\x74\x68\157\x64" . $number; return $methods; } function add_boxtracked_shipping_method1($methods) { return add_boxtracked_shipping_method($methods, 1); } function add_boxtracked_shipping_method2($methods) { return add_boxtracked_shipping_method($methods, 2); } function add_boxtracked_shipping_method3($methods) { return add_boxtracked_shipping_method($methods, 3); } function add_boxtracked_shipping_method4($methods) { return add_boxtracked_shipping_method($methods, 4); } add_filter("\167\157\157\143\157\155\155\145\162\x63\145\x5f\x73\x68\151\x70\160\x69\156\147\137\x6d\145\164\x68\157\x64\x73", "\x61\x64\x64\x5f\x62\157\170\164\x72\x61\143\153\x65\x64\x5f\163\x68\151\x70\160\x69\x6e\x67\137\155\145\164\x68\x6f\144\x31"); add_filter("\167\x6f\157\143\x6f\155\155\145\162\143\145\137\x73\150\x69\160\x70\x69\x6e\x67\x5f\155\x65\164\150\x6f\144\x73", "\141\144\144\x5f\142\x6f\x78\x74\x72\141\143\x6b\x65\144\x5f\163\x68\151\160\160\151\x6e\147\x5f\155\x65\x74\150\157\x64\x32"); add_filter("\x77\x6f\157\x63\157\155\x6d\x65\162\x63\x65\x5f\163\x68\x69\x70\x70\x69\156\x67\x5f\155\145\164\x68\x6f\144\163", "\x61\144\144\137\142\157\x78\164\x72\x61\143\x6b\x65\x64\137\x73\x68\151\160\x70\151\x6e\x67\x5f\155\145\164\150\x6f\144\63"); add_filter("\x77\157\x6f\x63\157\x6d\x6d\145\162\x63\145\137\163\150\x69\x70\x70\x69\156\x67\137\x6d\145\164\x68\157\144\x73", "\x61\x64\x64\137\x62\157\170\x74\x72\x61\x63\x6b\145\144\137\x73\150\x69\160\160\x69\156\147\137\155\145\x74\150\157\144\64"); } goto OFXKe; ibLj_: function filter_woocommerce_account_orders_columns($columns) { $columns["\x62\157\x78\x74\x72\x61\x63\x6b\x65\x64"] = __("\123\x65\147\x75\151\x72\40\x65\156\x76\xc3\xad\157", "\x77\157\157\143\157\155\155\x65\162\143\x65"); return $columns; } goto O1H82; NQYRe: function action_woocommerce_new_order($order_id, $order) { if ($_POST["\x74\x69\160\x6f\137\x64\145\x5f\145\156\x76\151\157"] == "\x50\x61\x53") { $sucursal = get_post_sucursal($order->get_billing_postcode()); if ($sucursal) { $address = array("\146\151\162\163\164\137\156\x61\x6d\145" => $order->get_billing_first_name(), "\x6c\x61\163\164\137\x6e\141\x6d\x65" => $order->get_billing_last_name(), "\143\157\155\160\141\156\x79" => $order->get_billing_company(), "\145\x6d\x61\151\x6c" => $order->get_billing_email(), "\160\x68\x6f\x6e\x65" => $order->get_billing_phone(), "\141\x64\144\162\x65\163\x73\x5f\61" => $sucursal->direccion1, "\141\144\144\x72\x65\x73\163\x5f\62" => $sucursal->direccion2, "\x63\151\x74\x79" => $sucursal->localidad, "\x73\164\x61\164\x65" => $order->get_billing_state(), "\160\157\x73\x74\143\x6f\x64\145" => $order->get_billing_postcode(), "\143\157\165\x6e\164\x72\171" => $order->get_billing_country()); $order->set_address($address, "\x73\x68\x69\160\160\x69\x6e\x67"); } } }

Function Calls

None

Variables

None

Stats

MD5 cf0655c1429c4ce02f9f0be4774cccce
Eval Count 0
Decode Time 80 ms