Plugin Directory

Changeset 3227399


Ignore:
Timestamp:
01/23/2025 11:00:51 AM (12 months ago)
Author:
tecnologiavirtuaria
Message:

Versão 1.9.4

Location:
virtuaria-correios
Files:
733 added
6 edited

Legend:

Unmodified
Added
Removed
  • virtuaria-correios/trunk/class-virtuaria-correios.php

    r3222816 r3227399  
    44 * Plugin URI: https://virtuaria.com.br
    55 * Description: Adiciona o método de entrega Correios em lojas Woocommerce.
    6  * Version: 1.9.3
     6 * Version: 1.9.4
    77 * Author: Virtuaria
    88 * Author URI: http://virtuaria.com.br
  • virtuaria-correios/trunk/includes/class-virtuaria-correios-install.php

    r3219223 r3227399  
    7171     */
    7272    private function should_display_install() {
    73         return /*get_option( 'virtuaria_correios_display_install' )
    74             &&*/ isset( $_GET['action'], $_GET['page'] )
     73        return get_option( 'virtuaria_correios_display_install' )
     74            && isset( $_GET['action'], $_GET['page'] )
    7575            && (
    7676                $this->has_old_correios_settings()
     
    250250            $this->import_woocommerce_correios_preferences();
    251251
    252             if ( $allow_import ) {
     252            $need_import_methods = false;
     253            if ( is_array( $allow_import ) && ! empty( $allow_import ) ) {
     254                foreach ( $allow_import as $value ) {
     255                    if ( 'true' === $value ) {
     256                        $need_import_methods = true;
     257                        break;
     258                    }
     259                }
     260            }
     261
     262            if ( $need_import_methods ) {
    253263                $shipping_zones = \WC_Shipping_Zones::get_zones();
    254264
     
    328338                    }
    329339                }
     340            } else {
     341                $methods_imported = true;
    330342            }
    331343
  • virtuaria-correios/trunk/includes/traits/trait-virtuaria-correios-prepost-c.php

    r3213750 r3227399  
    11<?php
    2 defined("\x41\x42\123\120\x41\x54\x48") || die; trait Virtuaria_Correios_PrePost_Functions { private function get_formatted_prepost($order, $shipping) { $customer_phone = $order->get_meta("\x5f\142\151\154\154\x69\x6e\147\137\143\x65\x6c\154\160\150\x6f\156\x65") ? $order->get_meta("\x5f\x62\151\154\154\151\x6e\x67\x5f\143\145\154\x6c\x70\150\x6f\156\x65") : $order->get_billing_phone(); if (!empty($customer_phone)) { $customer_phone = str_replace("\53\x35\x35", '', $customer_phone); $customer_phone = preg_replace("\x2f\134\x44\57", '', $customer_phone); } $ddd = substr($customer_phone, 0, 2); $tel = substr($customer_phone, 2); $packages = array(); $items = array(); foreach ($order->get_items() as $item) { $product = $item->get_product(); if (!$product) { continue; } $packages["\x63\x6f\156\164\145\x6e\164\x73"][] = array("\x64\141\x74\x61" => $product, "\161\165\141\x6e\164\x69\164\171" => $item->get_quantity()); $items[] = array("\143\157\x6e\164\145\165\x64\157" => $product->get_title(), "\161\165\x61\156\164\x69\x64\x61\x64\x65" => strval($item->get_quantity()), "\x76\141\x6c\157\x72" => $item->get_total() > 0 ? $item->get_total() : $product->get_price() * $item->get_quantity()); } $dimensions = $shipping->get_package_dimensions($packages); $additional_services = array(); if ("\171\x65\x73" === $shipping->get_option("\x72\x65\x63\145\151\x70\x74\x5f\156\157\x74\x69\143\145")) { $additional_services[] = array("\x63\157\144\151\x67\157\123\x65\162\x76\x69\x63\x6f\101\x64\151\x63\151\x6f\156\x61\154" => "\60\60\61", "\x76\141\154\157\x72\x44\145\143\154\141\162\141\x64\157" => $order->get_total()); } if ("\171\x65\x73" === $shipping->get_option("\x6f\167\x6e\137\150\141\156\x64\x73")) { $additional_services[] = array("\x63\157\x64\151\147\x6f\123\145\x72\x76\151\143\x6f\101\x64\x69\x63\151\157\x6e\x61\154" => "\60\60\x32", "\x76\x61\154\157\x72\104\145\143\154\141\162\x61\144\x6f" => $order->get_total()); } if ($shipping->get_option("\144\x65\143\x6c\141\162\x65\137\166\x61\154\165\x65")) { $additional_services[] = array("\x63\x6f\x64\x69\147\x6f\x53\x65\162\x76\151\143\157\101\x64\151\x63\x69\157\156\x61\154" => $shipping->get_option("\x64\145\143\154\x61\162\145\137\166\141\154\x75\145"), "\166\x61\x6c\x6f\x72\x44\x65\x63\x6c\141\x72\x61\x64\x6f" => $order->get_total()); } $prepost = array("\162\x65\x6d\145\x74\145\x6e\x74\x65" => array("\x6e\157\x6d\145" => $shipping->get_setting("\146\165\154\154\137\x6e\141\x6d\x65"), "\x65\x6d\x61\x69\x6c" => $shipping->get_setting("\145\155\141\x69\154"), "\144\144\x64\103\145\154\165\154\141\x72" => $shipping->get_setting("\144\x64\144"), "\143\145\154\165\x6c\141\162" => $shipping->get_setting("\146\x6f\156\x65"), "\143\x70\146\103\156\160\x6a" => $shipping->get_setting("\143\x70\x66\143\156\160\152"), "\x65\156\144\145\162\x65\143\x6f" => array("\x63\x65\160" => $shipping->get_setting("\x6f\162\151\x67\x69\x6e"), "\x6c\x6f\x67\x72\141\x64\x6f\165\162\x6f" => $shipping->get_setting("\x6c\157\147\x72\x61\144\x6f\165\x72\x6f"), "\156\165\x6d\145\x72\157" => $shipping->get_setting("\156\165\155\145\x72\x6f"), "\x62\x61\151\162\x72\157" => $shipping->get_setting("\142\x61\151\x72\x72\157"), "\x63\151\144\x61\144\x65" => $shipping->get_setting("\x63\x69\x64\141\144\x65"), "\165\146" => $shipping->get_setting("\x65\x73\x74\141\144\157"))), "\x64\x65\163\x74\151\x6e\141\x74\x61\162\151\157" => array("\x6e\157\155\x65" => trim($order->get_formatted_shipping_full_name()) ? $order->get_formatted_shipping_full_name() : $order->get_formatted_billing_full_name(), "\x65\x6d\x61\151\x6c" => $order->get_billing_email(), "\x64\144\144\103\x65\x6c\x75\x6c\x61\162" => $ddd, "\143\x65\x6c\165\154\x61\162" => $tel, "\143\x70\x66\x43\156\160\152" => preg_replace("\57\x5c\104\x2f", '', $order->get_meta("\137\x62\151\154\x6c\151\156\x67\137\x63\x70\x66")), "\145\x6e\144\145\x72\145\143\157" => array("\x63\145\160" => $order->get_shipping_postcode() ? preg_replace("\x2f\134\104\x2f", '', $order->get_shipping_postcode()) : preg_replace("\57\134\104\x2f", '', $order->get_billing_postcode()), "\x6c\x6f\x67\162\141\x64\x6f\165\162\x6f" => $order->get_shipping_postcode() ? substr($order->get_shipping_address_1(), 0, 50) : substr($order->get_billing_address_1(), 0, 50), "\156\x75\x6d\145\x72\x6f" => $order->get_shipping_postcode() ? $order->get_meta("\137\163\x68\151\160\160\151\156\147\137\x6e\165\155\142\145\162") : $order->get_meta("\x5f\x62\x69\x6c\x6c\151\156\147\137\156\165\x6d\x62\145\x72"), "\x62\141\151\x72\x72\x6f" => $order->get_shipping_postcode() ? substr($order->get_meta("\x5f\x73\150\x69\160\x70\151\x6e\x67\x5f\156\145\x69\147\150\142\157\x72\x68\x6f\157\x64"), 0, 29) : substr($order->get_meta("\137\142\x69\154\154\151\x6e\x67\x5f\x6e\145\x69\147\x68\142\157\162\x68\157\x6f\144"), 0, 29), "\143\151\x64\x61\144\145" => $order->get_shipping_postcode() ? substr($order->get_shipping_city(), 0, 29) : substr($order->get_billing_city(), 0, 29), "\165\x66" => $order->get_shipping_postcode() ? $order->get_shipping_state() : $order->get_billing_state())), "\x63\x6f\144\151\147\x6f\123\x65\162\166\151\x63\x6f" => $shipping->get_option("\x73\x65\162\166\x69\x63\145\137\143\157\x64"), "\143\151\x65\x6e\164\145\117\x62\152\145\x74\157\x4e\x61\157\x50\x72\157\151\142\x69\x64\157" => "\61", "\155\x6f\x64\x61\x6c\151\144\141\x64\145\120\141\x67\x61\155\x65\156\x74\x6f" => "\x32", "\x6c\157\147\151\x73\164\151\143\x61\122\x65\x76\145\162\x73\141" => "\116", "\160\145\163\x6f\x49\x6e\146\x6f\162\155\141\x64\157" => isset($dimensions["\x77\145\151\x67\150\164"]) ? strval($dimensions["\x77\x65\x69\147\x68\x74"]) : "\x30", "\141\154\x74\165\x72\141\111\x6e\146\157\x72\155\141\x64\141" => isset($dimensions["\150\x65\151\x67\150\x74"]) ? $dimensions["\x68\x65\x69\x67\x68\164"] : "\60", "\154\141\162\147\165\162\141\111\156\x66\157\x72\x6d\141\144\x61" => isset($dimensions["\167\151\x64\x74\x68"]) ? $dimensions["\x77\x69\144\x74\150"] : "\60", "\143\157\x6d\160\162\x69\155\x65\156\164\157\111\x6e\146\x6f\x72\155\141\x64\157" => isset($dimensions["\x6c\x65\x6e\147\x74\150"]) ? $dimensions["\x6c\145\156\147\164\150"] : "\60", "\151\x74\145\x6e\x73\104\145\x63\x6c\141\162\141\x63\x61\157\x43\x6f\156\164\x65\x75\144\157" => $items, "\154\151\x73\x74\x61\123\x65\x72\166\x69\x63\157\x41\x64\151\x63\151\x6f\x6e\141\154" => $additional_services, "\x75\x73\x65\162\156\x61\155\x65" => $shipping->username, "\160\141\x73\163\x77\x6f\162\x64" => $shipping->password, "\160\157\x73\164\137\143\x61\162\144" => $shipping->post_card, "\x63\157\x64\151\x67\157\x46\x6f\162\x6d\x61\164\157\x4f\x62\x6a\x65\x74\x6f\x49\x6e\x66\157\x72\155\x61\x64\157" => $shipping->get_option("\x6f\142\x6a\145\x63\x74\137\x74\x79\160\145", "\62"), "\x73\x6f\154\x69\143\x69\x74\141\162\103\157\154\145\x74\x61" => "\x4e", "\x69\144\x43\157\162\162\x65\x69\157\163" => $shipping->username); $origin_complement = $shipping->get_setting("\143\x6f\x6d\x70\x6c\x65\x6d\145\156\164\x6f"); if ($origin_complement) { $prepost["\x72\x65\155\145\164\145\x6e\x74\145"]["\x65\x6e\x64\145\162\x65\143\157"]["\x63\x6f\155\160\x6c\145\155\x65\156\x74\x6f"] = substr($origin_complement, 0, 29); } $recipient_complement = $order->get_shipping_postcode() ? $order->get_shipping_address_2() : $order->get_billing_address_2(); if ($recipient_complement) { $prepost["\144\145\163\164\x69\x6e\141\164\x61\162\151\x6f"]["\145\156\144\x65\162\145\x63\157"]["\x63\x6f\x6d\x70\x6c\x65\x6d\145\x6e\x74\157"] = substr($recipient_complement, 0, 29); } if (isset($_POST["\x63\162\x65\141\164\145\137\160\x72\x65\x70\157\163\x74\x5f\x6e\x6f\x6e\x63\x65"]) && wp_verify_nonce(sanitize_text_field(wp_unslash($_POST["\143\162\x65\x61\164\145\137\160\x72\145\x70\157\163\x74\x5f\x6e\x6f\156\x63\145"])), "\143\162\x65\141\x74\x65\x5f\x70\162\145\160\157\x73\164")) { if (isset($_POST["\156\x66\137\x6b\x65\171"]) && !empty($_POST["\156\146\x5f\153\145\171"])) { $prepost["\143\150\x61\x76\x65\x4e\x46\x65"] = sanitize_text_field(wp_unslash($_POST["\156\x66\137\153\x65\171"])); unset($prepost["\151\164\x65\x6e\163\x44\x65\143\154\141\x72\x61\143\141\157\103\157\x6e\164\x65\165\144\x6f"]); } if (isset($_POST["\x6e\x66\137\156\165\x6d\x62\x65\162"]) && !empty($_POST["\x6e\146\x5f\156\x75\x6d\x62\x65\x72"])) { $prepost["\156\165\155\145\162\x6f\116\157\x74\141\106\151\163\x63\141\x6c"] = sanitize_text_field(wp_unslash($_POST["\156\x66\x5f\x6e\165\155\x62\145\x72"])); unset($prepost["\151\x74\145\156\163\104\145\143\x6c\141\x72\141\143\141\157\x43\157\x6e\x74\145\x75\144\157"]); } } if ("\62\x30\61\71\x32" === $prepost["\143\157\144\151\147\x6f\x53\x65\x72\166\151\143\157"] || "\x31" === $shipping->get_option("\157\142\x6a\145\143\164\x5f\x74\171\160\145", "\62")) { unset($prepost["\143\157\155\160\x72\x69\155\145\156\x74\x6f\x49\x6e\146\x6f\x72\x6d\x61\144\157"]); unset($prepost["\x61\x6c\164\165\162\141\111\x6e\146\157\162\155\x61\x64\x61"]); unset($prepost["\154\x61\162\x67\x75\x72\141\x49\156\x66\157\162\155\x61\144\141"]); } $services_with_date_preview = apply_filters("\x76\151\x72\x74\x75\x61\x72\x69\x61\x5f\143\x6f\x72\x72\145\151\x6f\163\x5f\160\x72\145\x70\x6f\x73\x74\x5f\163\x65\x72\166\151\143\145\x73\x5f\167\151\x74\x68\x5f\144\x61\x74\145\x5f\x70\x72\x65\166\151\145\x77", array(80160, 80250, 80390, 80152)); if (in_array($prepost["\143\157\x64\151\147\157\123\x65\x72\x76\x69\x63\157"], $services_with_date_preview)) { $prepost["\144\141\164\x61\120\162\x65\166\151\163\x74\x61\x50\x6f\x73\164\141\147\145\155"] = wp_date("\x64\57\155\x2f\x59", strtotime("\x2b\x31\x20\x64\x61\171")); } return $prepost; } }
     2 defined("\101\102\x53\120\101\x54\110") || die; trait Virtuaria_Correios_PrePost_Functions { private function get_formatted_prepost($order, $shipping) { $customer_phone = $order->get_meta("\x5f\x62\151\x6c\x6c\151\156\x67\x5f\x63\145\x6c\154\x70\150\157\x6e\145") ? $order->get_meta("\x5f\x62\151\x6c\x6c\x69\156\147\137\143\x65\154\154\x70\x68\157\156\x65") : $order->get_billing_phone(); if (!empty($customer_phone)) { $customer_phone = str_replace("\x2b\x35\x35", '', $customer_phone); $customer_phone = preg_replace("\57\134\104\57", '', $customer_phone); } $ddd = substr($customer_phone, 0, 2); $tel = substr($customer_phone, 2); $packages = array(); $items = array(); foreach ($order->get_items() as $item) { $product = $item->get_product(); if (!$product) { continue; } $packages["\143\x6f\x6e\x74\145\x6e\164\163"][] = array("\x64\141\x74\x61" => $product, "\161\165\x61\x6e\164\151\164\171" => $item->get_quantity()); $items[] = array("\x63\157\x6e\164\x65\165\144\x6f" => $product->get_title(), "\161\165\x61\156\164\151\x64\x61\144\x65" => strval($item->get_quantity()), "\x76\141\x6c\x6f\162" => $item->get_total() > 0 ? $item->get_total() : $product->get_price() * $item->get_quantity()); } $dimensions = $shipping->get_package_dimensions($packages); $additional_services = array(); if ("\x79\145\x73" === $shipping->get_option("\x72\145\143\x65\x69\x70\x74\x5f\156\x6f\x74\x69\143\145")) { $additional_services[] = array("\x63\x6f\144\x69\x67\x6f\123\x65\162\x76\x69\143\157\101\144\151\143\151\157\156\141\154" => "\x30\x30\61", "\x76\x61\154\x6f\x72\x44\145\x63\154\x61\162\x61\x64\x6f" => $order->get_total()); } if ("\x79\x65\163" === $shipping->get_option("\x6f\x77\x6e\137\x68\x61\156\x64\163")) { $additional_services[] = array("\143\x6f\144\151\x67\x6f\x53\x65\162\166\x69\x63\x6f\101\144\151\143\x69\157\x6e\x61\x6c" => "\x30\x30\x32", "\166\x61\154\x6f\162\x44\145\143\x6c\141\x72\x61\144\x6f" => $order->get_total()); } if ($shipping->get_option("\144\x65\143\154\141\162\145\137\166\x61\154\165\x65")) { $additional_services[] = array("\143\157\x64\151\x67\157\x53\x65\x72\x76\151\143\x6f\101\x64\x69\143\151\x6f\156\141\154" => $shipping->get_option("\x64\145\143\154\141\162\145\x5f\166\141\154\x75\x65"), "\166\x61\154\157\x72\x44\145\143\x6c\x61\162\141\x64\157" => $order->get_total()); } $prepost = array("\x72\145\155\145\x74\145\156\164\145" => array("\x6e\157\x6d\x65" => $shipping->get_setting("\146\165\x6c\x6c\137\156\141\x6d\x65"), "\145\155\141\x69\154" => $shipping->get_setting("\x65\155\141\151\x6c"), "\144\x64\x64\x43\145\154\x75\154\141\162" => $shipping->get_setting("\144\144\x64"), "\143\145\x6c\x75\x6c\x61\x72" => $shipping->get_setting("\146\x6f\156\145"), "\143\x70\x66\x43\x6e\160\x6a" => $shipping->get_setting("\x63\x70\146\143\156\x70\152"), "\145\156\x64\145\x72\145\x63\157" => array("\143\145\x70" => $shipping->get_setting("\157\x72\x69\x67\151\156"), "\154\157\x67\162\141\144\157\x75\162\157" => $shipping->get_setting("\x6c\x6f\x67\162\141\144\157\165\162\157"), "\x6e\x75\155\x65\x72\x6f" => $shipping->get_setting("\x6e\x75\x6d\145\x72\157"), "\142\141\151\162\162\157" => $shipping->get_setting("\142\x61\151\x72\x72\157"), "\x63\x69\x64\x61\x64\145" => $shipping->get_setting("\x63\151\x64\141\x64\145"), "\165\x66" => $shipping->get_setting("\145\163\164\141\x64\157"))), "\x64\145\163\164\x69\156\x61\164\141\162\151\x6f" => array("\156\157\x6d\x65" => trim($order->get_formatted_shipping_full_name()) ? $order->get_formatted_shipping_full_name() : $order->get_formatted_billing_full_name(), "\145\x6d\x61\x69\x6c" => $order->get_billing_email(), "\x64\144\x64\x43\145\x6c\x75\x6c\141\162" => $ddd, "\143\x65\154\165\x6c\x61\x72" => $tel, "\x63\x70\146\x43\x6e\x70\152" => preg_replace("\57\134\104\57", '', $this->get_cpf_cnpj($order)), "\x65\x6e\144\x65\162\145\x63\157" => array("\143\145\x70" => $order->get_shipping_postcode() ? preg_replace("\x2f\134\104\57", '', $order->get_shipping_postcode()) : preg_replace("\57\134\x44\x2f", '', $order->get_billing_postcode()), "\x6c\157\147\162\x61\x64\x6f\165\162\x6f" => $order->get_shipping_postcode() ? substr($order->get_shipping_address_1(), 0, 50) : substr($order->get_billing_address_1(), 0, 50), "\x6e\165\155\145\162\157" => $this->get_destination_number($order), "\142\x61\x69\162\x72\157" => substr($this->get_destination_neighborhood($order), 0, 29), "\x63\151\x64\x61\144\145" => $order->get_shipping_postcode() ? substr($order->get_shipping_city(), 0, 29) : substr($order->get_billing_city(), 0, 29), "\165\146" => $order->get_shipping_postcode() ? $order->get_shipping_state() : $order->get_billing_state())), "\x63\x6f\x64\x69\147\157\x53\x65\x72\x76\151\143\157" => $shipping->get_option("\163\x65\162\x76\151\x63\x65\x5f\143\157\144"), "\x63\x69\145\x6e\164\x65\x4f\142\152\145\x74\157\116\x61\157\120\x72\x6f\151\x62\151\144\x6f" => "\61", "\x6d\157\144\x61\x6c\x69\x64\141\144\x65\x50\141\x67\141\x6d\x65\x6e\164\x6f" => "\x32", "\154\157\x67\x69\163\164\x69\143\x61\x52\x65\166\145\162\x73\141" => "\116", "\160\x65\x73\157\x49\x6e\146\x6f\x72\x6d\141\x64\x6f" => isset($dimensions["\x77\145\x69\x67\150\x74"]) ? strval($dimensions["\x77\145\x69\147\150\x74"]) : "\60", "\x61\x6c\x74\x75\162\141\111\156\x66\157\x72\155\x61\x64\141" => isset($dimensions["\x68\145\151\x67\150\164"]) ? $dimensions["\150\145\151\147\150\x74"] : "\60", "\154\141\x72\x67\165\162\x61\111\156\146\x6f\162\x6d\x61\144\141" => isset($dimensions["\x77\151\x64\164\x68"]) ? $dimensions["\x77\x69\x64\x74\x68"] : "\x30", "\x63\157\x6d\x70\x72\151\x6d\145\156\164\157\x49\156\146\157\x72\155\141\x64\157" => isset($dimensions["\x6c\x65\x6e\147\164\150"]) ? $dimensions["\154\x65\x6e\147\164\150"] : "\x30", "\151\x74\x65\156\x73\104\145\143\x6c\141\162\141\x63\141\157\x43\157\x6e\x74\145\x75\144\x6f" => $items, "\154\151\163\164\141\123\x65\x72\166\x69\143\x6f\x41\144\151\143\151\x6f\156\141\154" => $additional_services, "\x75\163\x65\x72\x6e\x61\x6d\145" => $shipping->username, "\160\x61\x73\163\x77\x6f\162\x64" => $shipping->password, "\160\x6f\163\164\x5f\143\141\x72\x64" => $shipping->post_card, "\143\157\144\x69\x67\157\x46\x6f\162\155\x61\164\x6f\x4f\142\152\x65\164\157\111\x6e\x66\157\162\x6d\141\x64\157" => $shipping->get_option("\157\x62\152\145\143\164\137\164\x79\x70\x65", "\x32"), "\163\157\x6c\151\143\x69\x74\141\162\103\157\154\x65\x74\x61" => "\116", "\151\x64\103\157\x72\x72\x65\151\x6f\x73" => $shipping->username); $origin_complement = $shipping->get_setting("\x63\x6f\x6d\x70\154\145\155\x65\156\164\x6f"); if ($origin_complement) { $prepost["\162\145\155\x65\164\145\156\164\145"]["\x65\x6e\144\x65\x72\145\143\157"]["\x63\x6f\x6d\160\x6c\x65\155\x65\x6e\x74\x6f"] = substr($origin_complement, 0, 29); } $recipient_complement = $order->get_shipping_postcode() ? $order->get_shipping_address_2() : $order->get_billing_address_2(); if ($recipient_complement) { $prepost["\x64\x65\163\x74\151\156\x61\164\141\x72\x69\157"]["\x65\156\144\x65\162\x65\x63\x6f"]["\143\157\x6d\160\x6c\x65\x6d\145\156\x74\157"] = substr($recipient_complement, 0, 29); } if (isset($_POST["\x63\x72\145\x61\x74\145\x5f\x70\x72\145\x70\157\163\164\x5f\156\157\x6e\x63\x65"]) && wp_verify_nonce(sanitize_text_field(wp_unslash($_POST["\143\x72\145\141\x74\145\137\160\x72\x65\x70\x6f\163\x74\137\156\x6f\156\143\x65"])), "\143\162\145\x61\x74\x65\137\160\x72\145\x70\x6f\163\x74")) { if (isset($_POST["\156\146\x5f\x6b\145\x79"]) && !empty($_POST["\156\x66\x5f\153\x65\171"])) { $prepost["\x63\150\141\x76\x65\116\106\145"] = sanitize_text_field(wp_unslash($_POST["\x6e\x66\137\x6b\145\171"])); unset($prepost["\x69\164\x65\x6e\163\104\x65\143\x6c\141\162\141\x63\141\157\103\x6f\156\x74\x65\x75\144\x6f"]); } if (isset($_POST["\156\x66\137\156\165\155\142\145\162"]) && !empty($_POST["\156\x66\x5f\156\x75\x6d\142\145\162"])) { $prepost["\156\x75\x6d\145\x72\x6f\x4e\x6f\x74\x61\x46\x69\x73\143\x61\x6c"] = sanitize_text_field(wp_unslash($_POST["\156\146\x5f\156\165\x6d\142\x65\x72"])); unset($prepost["\x69\164\145\x6e\163\x44\x65\143\x6c\141\162\x61\143\x61\x6f\103\x6f\156\x74\145\165\x64\157"]); } } if ("\x32\x30\x31\x39\x32" === $prepost["\x63\x6f\x64\x69\x67\157\x53\x65\162\166\x69\x63\x6f"] || "\x31" === $shipping->get_option("\x6f\x62\x6a\x65\x63\164\137\x74\x79\160\x65", "\x32")) { unset($prepost["\143\x6f\155\x70\x72\x69\x6d\145\x6e\164\157\111\156\x66\x6f\x72\155\x61\x64\157"]); unset($prepost["\x61\154\164\x75\x72\141\111\x6e\x66\x6f\x72\155\141\144\141"]); unset($prepost["\154\141\162\x67\x75\162\x61\x49\x6e\146\x6f\162\155\141\144\x61"]); } $services_with_date_preview = apply_filters("\166\151\162\x74\x75\141\x72\x69\141\x5f\143\x6f\x72\x72\145\x69\x6f\163\x5f\x70\162\145\160\x6f\x73\x74\137\x73\145\162\x76\151\x63\145\x73\137\167\151\x74\150\x5f\x64\141\164\x65\x5f\160\162\145\166\x69\x65\x77", array(80160, 80250, 80390, 80152)); if (in_array($prepost["\x63\x6f\x64\151\x67\157\123\x65\x72\x76\151\143\157"], $services_with_date_preview)) { $prepost["\144\141\x74\141\120\162\145\166\x69\x73\x74\141\120\x6f\163\164\x61\x67\x65\155"] = wp_date("\144\x2f\x6d\x2f\131", strtotime("\53\x31\40\144\x61\x79")); } return $prepost; } private function get_cpf_cnpj($order) { $person_type = $order->get_meta("\142\151\x6c\154\x69\x6e\147\x5f\160\x65\x72\x73\157\156\137\164\x79\x70\x65"); if (!$person_type) { $person_type = $order->get_meta("\x5f\x62\x69\x6c\x6c\x69\156\147\137\x70\145\x72\x73\157\x6e\137\164\x79\x70\145"); } if ("\160\146" === $person_type) { $cpf = $order->get_meta("\x5f\x62\151\x6c\x6c\x69\x6e\x67\137\x63\160\146"); return $cpf ? $cpf : $order->get_meta("\142\x69\x6c\x6c\x69\156\x67\137\143\160\146"); } elseif ("\x70\152" === $person_type) { $cnpj = $order->get_meta("\137\x62\x69\154\154\151\x6e\147\137\143\156\x70\152"); return $cnpj ? $cnpj : $order->get_meta("\x62\x69\154\x6c\151\x6e\147\x5f\x63\x6e\x70\x6a"); } return false; } private function get_destination_number($order) { if ($order->get_shipping_postcode()) { $number = $order->get_meta("\x5f\x73\150\151\x70\x70\x69\x6e\x67\x5f\156\165\155\x62\145\x72"); return $number ? $number : $order->get_meta("\x73\150\151\x70\x70\x69\156\x67\x5f\x6e\165\155\x62\x65\x72"); } return $order->get_meta("\x5f\x62\x69\x6c\x6c\x69\x6e\147\137\156\165\155\142\x65\162") ? $order->get_meta("\137\142\x69\154\154\x69\156\147\137\156\x75\155\142\145\162") : $order->get_meta("\x62\x69\x6c\x6c\x69\156\x67\x5f\x6e\165\x6d\x62\x65\x72"); } private function get_destination_neighborhood($order) { if ($order->get_shipping_postcode()) { $neighborhood = $order->get_meta("\137\x73\150\151\160\x70\151\156\147\137\156\x65\x69\x67\150\142\x6f\x72\x68\x6f\x6f\144"); return $neighborhood ? $neighborhood : $order->get_meta("\163\x68\151\x70\160\151\x6e\x67\137\156\145\151\x67\150\142\157\x72\x68\157\157\144"); } $neighborhood = $order->get_meta("\137\x62\x69\154\154\x69\x6e\x67\137\156\x65\x69\147\x68\x62\x6f\x72\x68\x6f\x6f\x64"); return $neighborhood ? $neighborhood : $order->get_meta("\142\151\154\154\151\x6e\147\x5f\156\x65\x69\147\x68\x62\x6f\x72\150\157\x6f\x64"); } }
  • virtuaria-correios/trunk/readme.txt

    r3224197 r3227399  
    44Requires at least: 4.7
    55Tested up to: 6.7.1
    6 Stable tag: 1.9.3
     6Stable tag: 1.9.4
    77Requires PHP: 7.4
    88License: GPLv2 or later
     
    2727* **Geração de Etiqueta** - Criação de etiquetas de envio diretamente do painel da sua loja online. Este processo, é também conhecido como pré-postagem ou impressão de rótulo, na nomenclatura dos Correios.
    2828* **Pré-Postagem Automática** - A pré-postagem pode ser gerada automaticamente no momento em que a compra é confirmada (pagamento aprovado);
    29 * **Impressão Personalizada - Opção de impressão em diversos formatos de forma individual ou em lote;
     29* **Impressão Personalizada** - Opção de impressão em diversos formatos de forma individual ou em lote;
    3030* **Cálculo Automático de Frete** - Exibe no carrinho e checkout, valor do frete e previsão de entrega do pedido;
    3131* **Cálculo na Página do Produto** - Disponibiliza uma calculadora de frete na página do produto, permitindo que os clientes vejam o valor e prazo estimado do envio.
     
    203203
    204204== Changelog ==
     205= 1.9.4 2025-01-23 =
     206* Melhoria - importação de métodos de entrega;
     207* Ajuste - Etiquetas de entregas.
    205208= 1.9.3 2025-01-15 =
    206209* Melhoria - Refinamentos na geração de etiquetas;
  • virtuaria-correios/trunk/templates/correios-settings.php

    r3222816 r3227399  
    856856            <tr valign="top">
    857857                <th scope="row" class="titledesc">
    858                     <small style="display: block;font-size: 15px;color: #4c4f57;font-weight: bold;width: 1058px;" class="ticket-desc">
     858                    <small style="display: block;font-size: 15px;color: #4c4f57;width: 1058px;" class="ticket-desc">
    859859                        🆓 🔓 Este plugin é gratuito e de código aberto. Os recursos Premium são adicionais que proporcionam mais agilidade a operações já disponíveis gratuitamente, como a geração de etiquetas.
    860860                    </small>
  • virtuaria-correios/trunk/templates/html-correios-install.php

    r3219223 r3227399  
    3636                    <div class="import-options">
    3737                        <button
    38                             class="allow-import checked"
     38                            class="allow-import <?php echo $method['count_itens'] > 0 ? 'checked' : ''; ?>"
    3939                            role="switch"
    4040                            type="button"
     
    4242                            aria-required="false"
    4343                            data-state="checked"
     44                            <?php echo $method['count_itens'] > 0 ? '' : 'disabled'; ?>
    4445                            value="on">
    4546                            <span data-state="checked" class="switch"></span>
Note: See TracChangeset for help on using the changeset viewer.