Version Description
2016/08/20 =
Introduzida a funo
wc_correios_get_address_by_postcode()
.Removida opo de seguro para mtodos internacionais, pois o valor adicionado era o valor do premio do seguro automtico.
Corrigido e-Sedex para aceitar apenas a opo corporativa.
Download this release
Release Info
Developer | claudiosanches |
Plugin | WooCommerce Correios |
Version | 3.0.6 |
Comparing to | |
See all releases |
Code changes from version 3.0.5 to 3.0.6
- includes/abstracts/abstract-wc-correios-international-shipping.php +7 -20
- includes/class-wc-correios-autofill-addresses.php +30 -24
- includes/shipping/class-wc-correios-shipping-esedex.php +12 -0
- includes/wc-correios-functions.php +11 -0
- languages/woocommerce-correios.pot +30 -39
- readme.txt +8 -2
- woocommerce-correios.php +2 -2
includes/abstracts/abstract-wc-correios-international-shipping.php
CHANGED
@@ -35,14 +35,13 @@ abstract class WC_Correios_International_Shipping extends WC_Correios_Shipping {
|
|
35 |
$this->init_form_fields();
|
36 |
|
37 |
// Define user set variables.
|
38 |
-
$this->enabled
|
39 |
-
$this->title
|
40 |
-
$this->origin_state
|
41 |
-
$this->origin_location
|
42 |
-
$this->show_delivery_time
|
43 |
-
$this->fee
|
44 |
-
$this->
|
45 |
-
$this->debug = $this->get_option( 'debug' );
|
46 |
|
47 |
// Save admin options.
|
48 |
add_action( 'woocommerce_update_options_shipping_' . $this->id, array( $this, 'process_admin_options' ) );
|
@@ -114,14 +113,6 @@ abstract class WC_Correios_International_Shipping extends WC_Correios_Shipping {
|
|
114 |
'description' => __( 'Use these options to add the value of each service provided by the Correios.', 'woocommerce-correios' ),
|
115 |
'default' => '',
|
116 |
),
|
117 |
-
'automatic_insurance' => array(
|
118 |
-
'title' => __( 'Automatic Insurance', 'woocommerce-correios' ),
|
119 |
-
'type' => 'checkbox',
|
120 |
-
'label' => __( 'Enable automatic insurance', 'woocommerce-correios' ),
|
121 |
-
'description' => __( 'This controls if need to apply insurance to the order.', 'woocommerce-correios' ),
|
122 |
-
'desc_tip' => true,
|
123 |
-
'default' => 'yes',
|
124 |
-
),
|
125 |
'testing' => array(
|
126 |
'title' => __( 'Testing', 'woocommerce-correios' ),
|
127 |
'type' => 'title',
|
@@ -198,10 +189,6 @@ abstract class WC_Correios_International_Shipping extends WC_Correios_Shipping {
|
|
198 |
return;
|
199 |
}
|
200 |
|
201 |
-
if ( 'yes' === $this->automatic_insurance ) {
|
202 |
-
$cost += sanitize_text_field( (float) $shipping->dados_postais->seguro_automatico );
|
203 |
-
}
|
204 |
-
|
205 |
// Apply fees.
|
206 |
$fee = $this->get_fee( $this->fee, $cost );
|
207 |
|
35 |
$this->init_form_fields();
|
36 |
|
37 |
// Define user set variables.
|
38 |
+
$this->enabled = $this->get_option( 'enabled' );
|
39 |
+
$this->title = $this->get_option( 'title' );
|
40 |
+
$this->origin_state = $this->get_option( 'origin_state' );
|
41 |
+
$this->origin_location = $this->get_option( 'origin_location' );
|
42 |
+
$this->show_delivery_time = $this->get_option( 'show_delivery_time' );
|
43 |
+
$this->fee = $this->get_option( 'fee' );
|
44 |
+
$this->debug = $this->get_option( 'debug' );
|
|
|
45 |
|
46 |
// Save admin options.
|
47 |
add_action( 'woocommerce_update_options_shipping_' . $this->id, array( $this, 'process_admin_options' ) );
|
113 |
'description' => __( 'Use these options to add the value of each service provided by the Correios.', 'woocommerce-correios' ),
|
114 |
'default' => '',
|
115 |
),
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
116 |
'testing' => array(
|
117 |
'title' => __( 'Testing', 'woocommerce-correios' ),
|
118 |
'type' => 'title',
|
189 |
return;
|
190 |
}
|
191 |
|
|
|
|
|
|
|
|
|
192 |
// Apply fees.
|
193 |
$fee = $this->get_fee( $this->fee, $cost );
|
194 |
|
includes/class-wc-correios-autofill-addresses.php
CHANGED
@@ -35,7 +35,7 @@ class WC_Correios_Autofill_Addresses {
|
|
35 |
*
|
36 |
* @var string
|
37 |
*/
|
38 |
-
private $_webservice_url = 'https://apps.correios.com.br/SigepMasterJPA/AtendeClienteService/AtendeCliente?wsdl';
|
39 |
|
40 |
/**
|
41 |
* Initialize actions.
|
@@ -61,8 +61,8 @@ class WC_Correios_Autofill_Addresses {
|
|
61 |
*
|
62 |
* @return string
|
63 |
*/
|
64 |
-
protected function get_tracking_addresses_webservice_url() {
|
65 |
-
return apply_filters( 'woocommerce_correios_addresses_webservice_url',
|
66 |
}
|
67 |
|
68 |
/**
|
@@ -70,7 +70,7 @@ class WC_Correios_Autofill_Addresses {
|
|
70 |
*
|
71 |
* @param string $data Data to log.
|
72 |
*/
|
73 |
-
protected function logger( $data ) {
|
74 |
if ( apply_filters( 'woocommerce_correios_enable_autofill_addresses_debug', false ) ) {
|
75 |
$logger = new WC_Logger();
|
76 |
$logger->add( 'correios-autofill-addresses', $data );
|
@@ -82,7 +82,7 @@ class WC_Correios_Autofill_Addresses {
|
|
82 |
*
|
83 |
* @return string
|
84 |
*/
|
85 |
-
protected function get_validity() {
|
86 |
return apply_filters( 'woocommerce_correios_autofill_addresses_validity', 'forever' );
|
87 |
}
|
88 |
|
@@ -93,24 +93,30 @@ class WC_Correios_Autofill_Addresses {
|
|
93 |
*
|
94 |
* @return stdClass
|
95 |
*/
|
96 |
-
|
97 |
global $wpdb;
|
98 |
|
|
|
|
|
|
|
|
|
|
|
|
|
99 |
$table = $wpdb->prefix . self::$table;
|
100 |
$address = $wpdb->get_row( $wpdb->prepare( "SELECT * FROM $table WHERE postcode = %s;", $postcode ) );
|
101 |
|
102 |
if ( is_wp_error( $address ) || is_null( $address ) ) {
|
103 |
-
$address =
|
104 |
|
105 |
if ( ! is_null( $address ) ) {
|
106 |
-
|
107 |
}
|
108 |
-
} elseif (
|
109 |
-
$_address =
|
110 |
|
111 |
if ( ! is_null( $_address ) ) {
|
112 |
$address = $_address;
|
113 |
-
|
114 |
}
|
115 |
}
|
116 |
|
@@ -123,8 +129,8 @@ class WC_Correios_Autofill_Addresses {
|
|
123 |
* @param string $last_query
|
124 |
* @return bool
|
125 |
*/
|
126 |
-
protected function check_if_expired( $last_query ) {
|
127 |
-
$validity =
|
128 |
|
129 |
if ( 'forever' !== $validity && strtotime( '+' . $validity . ' months', strtotime( $last_query ) ) < current_time( 'timestamp' ) ) {
|
130 |
return true;
|
@@ -140,7 +146,7 @@ class WC_Correios_Autofill_Addresses {
|
|
140 |
*
|
141 |
* @return bool
|
142 |
*/
|
143 |
-
protected function save_address( $address ) {
|
144 |
global $wpdb;
|
145 |
|
146 |
$default = array(
|
@@ -166,7 +172,7 @@ class WC_Correios_Autofill_Addresses {
|
|
166 |
/**
|
167 |
* Delete an address from database.
|
168 |
*/
|
169 |
-
protected function delete_address( $postcode ) {
|
170 |
global $wpdb;
|
171 |
|
172 |
$wpdb->delete( $wpdb->prefix . self::$table, array( 'postcode' => $postcode ), array( '%s' ) );
|
@@ -179,10 +185,10 @@ class WC_Correios_Autofill_Addresses {
|
|
179 |
*
|
180 |
* @return bool
|
181 |
*/
|
182 |
-
protected function update_address( $address ) {
|
183 |
-
|
184 |
|
185 |
-
return
|
186 |
}
|
187 |
|
188 |
/**
|
@@ -191,15 +197,15 @@ class WC_Correios_Autofill_Addresses {
|
|
191 |
* @param string $postcode
|
192 |
* @return stdClass
|
193 |
*/
|
194 |
-
protected function fetch_address( $postcode ) {
|
195 |
include_once dirname( __FILE__ ) . '/class-wc-correios-soap-client.php';
|
196 |
|
197 |
-
|
198 |
|
199 |
$address = null;
|
200 |
|
201 |
try {
|
202 |
-
$soap = new WC_Correios_Soap_Client(
|
203 |
$response = $soap->consultaCEP( array( 'cep' => $postcode ) );
|
204 |
$data = $response->return;
|
205 |
$address = new stdClass;
|
@@ -211,11 +217,11 @@ class WC_Correios_Autofill_Addresses {
|
|
211 |
$address->state = $data->uf;
|
212 |
$address->last_query = current_time( 'mysql' );
|
213 |
} catch ( Exception $e ) {
|
214 |
-
|
215 |
}
|
216 |
|
217 |
if ( ! is_null( $address ) ) {
|
218 |
-
|
219 |
}
|
220 |
|
221 |
return $address;
|
@@ -257,7 +263,7 @@ class WC_Correios_Autofill_Addresses {
|
|
257 |
exit;
|
258 |
}
|
259 |
|
260 |
-
$address =
|
261 |
|
262 |
if ( is_null( $address ) ) {
|
263 |
wp_send_json_error( array( 'message' => __( 'Invalid postcode.', 'woocommerce-correios' ) ) );
|
35 |
*
|
36 |
* @var string
|
37 |
*/
|
38 |
+
private static $_webservice_url = 'https://apps.correios.com.br/SigepMasterJPA/AtendeClienteService/AtendeCliente?wsdl';
|
39 |
|
40 |
/**
|
41 |
* Initialize actions.
|
61 |
*
|
62 |
* @return string
|
63 |
*/
|
64 |
+
protected static function get_tracking_addresses_webservice_url() {
|
65 |
+
return apply_filters( 'woocommerce_correios_addresses_webservice_url', self::$_webservice_url );
|
66 |
}
|
67 |
|
68 |
/**
|
70 |
*
|
71 |
* @param string $data Data to log.
|
72 |
*/
|
73 |
+
protected static function logger( $data ) {
|
74 |
if ( apply_filters( 'woocommerce_correios_enable_autofill_addresses_debug', false ) ) {
|
75 |
$logger = new WC_Logger();
|
76 |
$logger->add( 'correios-autofill-addresses', $data );
|
82 |
*
|
83 |
* @return string
|
84 |
*/
|
85 |
+
protected static function get_validity() {
|
86 |
return apply_filters( 'woocommerce_correios_autofill_addresses_validity', 'forever' );
|
87 |
}
|
88 |
|
93 |
*
|
94 |
* @return stdClass
|
95 |
*/
|
96 |
+
public static function get_address( $postcode ) {
|
97 |
global $wpdb;
|
98 |
|
99 |
+
$postcode = wc_correios_sanitize_postcode( $postcode );
|
100 |
+
|
101 |
+
if ( empty( $postcode ) || 8 !== strlen( $postcode ) ) {
|
102 |
+
return null;
|
103 |
+
}
|
104 |
+
|
105 |
$table = $wpdb->prefix . self::$table;
|
106 |
$address = $wpdb->get_row( $wpdb->prepare( "SELECT * FROM $table WHERE postcode = %s;", $postcode ) );
|
107 |
|
108 |
if ( is_wp_error( $address ) || is_null( $address ) ) {
|
109 |
+
$address = self::fetch_address( $postcode );
|
110 |
|
111 |
if ( ! is_null( $address ) ) {
|
112 |
+
self::save_address( (array) $address );
|
113 |
}
|
114 |
+
} elseif ( self::check_if_expired( $address->last_query ) ) {
|
115 |
+
$_address = self::fetch_address( $postcode );
|
116 |
|
117 |
if ( ! is_null( $_address ) ) {
|
118 |
$address = $_address;
|
119 |
+
self::update_address( (array) $address );
|
120 |
}
|
121 |
}
|
122 |
|
129 |
* @param string $last_query
|
130 |
* @return bool
|
131 |
*/
|
132 |
+
protected static function check_if_expired( $last_query ) {
|
133 |
+
$validity = self::get_validity();
|
134 |
|
135 |
if ( 'forever' !== $validity && strtotime( '+' . $validity . ' months', strtotime( $last_query ) ) < current_time( 'timestamp' ) ) {
|
136 |
return true;
|
146 |
*
|
147 |
* @return bool
|
148 |
*/
|
149 |
+
protected static function save_address( $address ) {
|
150 |
global $wpdb;
|
151 |
|
152 |
$default = array(
|
172 |
/**
|
173 |
* Delete an address from database.
|
174 |
*/
|
175 |
+
protected static function delete_address( $postcode ) {
|
176 |
global $wpdb;
|
177 |
|
178 |
$wpdb->delete( $wpdb->prefix . self::$table, array( 'postcode' => $postcode ), array( '%s' ) );
|
185 |
*
|
186 |
* @return bool
|
187 |
*/
|
188 |
+
protected static function update_address( $address ) {
|
189 |
+
self::delete_address( $address['postcode'] );
|
190 |
|
191 |
+
return self::save_address( $address );
|
192 |
}
|
193 |
|
194 |
/**
|
197 |
* @param string $postcode
|
198 |
* @return stdClass
|
199 |
*/
|
200 |
+
protected static function fetch_address( $postcode ) {
|
201 |
include_once dirname( __FILE__ ) . '/class-wc-correios-soap-client.php';
|
202 |
|
203 |
+
self::logger( sprintf( 'Fetching address for "%s" on Correios Webservices...', $postcode ) );
|
204 |
|
205 |
$address = null;
|
206 |
|
207 |
try {
|
208 |
+
$soap = new WC_Correios_Soap_Client( self::get_tracking_addresses_webservice_url() );
|
209 |
$response = $soap->consultaCEP( array( 'cep' => $postcode ) );
|
210 |
$data = $response->return;
|
211 |
$address = new stdClass;
|
217 |
$address->state = $data->uf;
|
218 |
$address->last_query = current_time( 'mysql' );
|
219 |
} catch ( Exception $e ) {
|
220 |
+
self::logger( sprintf( 'An error occurred while trying to fetch address for "%s": %s', $postcode, $e->getMessage() ) );
|
221 |
}
|
222 |
|
223 |
if ( ! is_null( $address ) ) {
|
224 |
+
self::logger( sprintf( 'Address for "%s" found successfully: %s', $postcode, print_r( $address, true ) ) );
|
225 |
}
|
226 |
|
227 |
return $address;
|
263 |
exit;
|
264 |
}
|
265 |
|
266 |
+
$address = self::get_address( $postcode );
|
267 |
|
268 |
if ( is_null( $address ) ) {
|
269 |
wp_send_json_error( array( 'message' => __( 'Invalid postcode.', 'woocommerce-correios' ) ) );
|
includes/shipping/class-wc-correios-shipping-esedex.php
CHANGED
@@ -35,5 +35,17 @@ class WC_Correios_Shipping_ESEDEX extends WC_Correios_Shipping {
|
|
35 |
$this->more_link = 'http://www.correios.com.br/para-voce/correios-de-a-a-z/e-sedex';
|
36 |
|
37 |
parent::__construct( $instance_id );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
38 |
}
|
39 |
}
|
35 |
$this->more_link = 'http://www.correios.com.br/para-voce/correios-de-a-a-z/e-sedex';
|
36 |
|
37 |
parent::__construct( $instance_id );
|
38 |
+
|
39 |
+
$this->instance_form_fields['service_type'] = array(
|
40 |
+
'title' => __( 'Service Type', 'woocommerce-correios' ),
|
41 |
+
'type' => 'select',
|
42 |
+
'description' => __( 'Choose between conventional or corporate service.', 'woocommerce-correios' ),
|
43 |
+
'desc_tip' => true,
|
44 |
+
'default' => 'corporate',
|
45 |
+
'class' => 'wc-enhanced-select',
|
46 |
+
'options' => array(
|
47 |
+
'corporate' => __( 'Corporate', 'woocommerce-correios' ),
|
48 |
+
),
|
49 |
+
);
|
50 |
}
|
51 |
}
|
includes/wc-correios-functions.php
CHANGED
@@ -158,3 +158,14 @@ function wc_correios_update_tracking_code( $order_id, $tracking_code ) {
|
|
158 |
|
159 |
return false;
|
160 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
158 |
|
159 |
return false;
|
160 |
}
|
161 |
+
|
162 |
+
/**
|
163 |
+
* Get address by postcode.
|
164 |
+
*
|
165 |
+
* @param string $postcode
|
166 |
+
*
|
167 |
+
* @return stdClass
|
168 |
+
*/
|
169 |
+
function wc_correios_get_address_by_postcode( $postcode ) {
|
170 |
+
return WC_Correios_Autofill_Addresses::get_address( $postcode );
|
171 |
+
}
|
languages/woocommerce-correios.pot
CHANGED
@@ -2,9 +2,9 @@
|
|
2 |
# This file is distributed under the GPLv2 or later.
|
3 |
msgid ""
|
4 |
msgstr ""
|
5 |
-
"Project-Id-Version: WooCommerce Correios 3.0.
|
6 |
"Report-Msgid-Bugs-To: https://wordpress.org/plugins/woocommerce-domination/\n"
|
7 |
-
"POT-Creation-Date: 2016-
|
8 |
"MIME-Version: 1.0\n"
|
9 |
"Content-Type: text/plain; charset=utf-8\n"
|
10 |
"Content-Transfer-Encoding: 8bit\n"
|
@@ -17,7 +17,7 @@ msgstr ""
|
|
17 |
msgid "%s is a international shipping method from Correios."
|
18 |
msgstr ""
|
19 |
|
20 |
-
#: includes/abstracts/abstract-wc-correios-international-shipping.php:
|
21 |
#: includes/abstracts/abstract-wc-correios-shipping.php:91
|
22 |
#: includes/emails/class-wc-correios-tracking-email.php:50
|
23 |
#: includes/integrations/class-wc-correios-integration.php:78
|
@@ -27,80 +27,80 @@ msgstr ""
|
|
27 |
msgid "Enable/Disable"
|
28 |
msgstr ""
|
29 |
|
30 |
-
#: includes/abstracts/abstract-wc-correios-international-shipping.php:
|
31 |
#: includes/abstracts/abstract-wc-correios-shipping.php:93
|
32 |
#: includes/shipping/class-wc-correios-shipping-carta-registrada.php:82
|
33 |
#: includes/shipping/class-wc-correios-shipping-legacy.php:81
|
34 |
msgid "Enable this shipping method"
|
35 |
msgstr ""
|
36 |
|
37 |
-
#: includes/abstracts/abstract-wc-correios-international-shipping.php:
|
38 |
#: includes/abstracts/abstract-wc-correios-shipping.php:97
|
39 |
#: includes/shipping/class-wc-correios-shipping-carta-registrada.php:86
|
40 |
#: includes/shipping/class-wc-correios-shipping-legacy.php:85
|
41 |
msgid "Title"
|
42 |
msgstr ""
|
43 |
|
44 |
-
#: includes/abstracts/abstract-wc-correios-international-shipping.php:
|
45 |
#: includes/abstracts/abstract-wc-correios-shipping.php:99
|
46 |
#: includes/shipping/class-wc-correios-shipping-carta-registrada.php:88
|
47 |
#: includes/shipping/class-wc-correios-shipping-legacy.php:87
|
48 |
msgid "This controls the title which the user sees during checkout."
|
49 |
msgstr ""
|
50 |
|
51 |
-
#: includes/abstracts/abstract-wc-correios-international-shipping.php:
|
52 |
#: includes/abstracts/abstract-wc-correios-shipping.php:104
|
53 |
#: includes/shipping/class-wc-correios-shipping-carta-registrada.php:93
|
54 |
msgid "Behavior Options"
|
55 |
msgstr ""
|
56 |
|
57 |
-
#: includes/abstracts/abstract-wc-correios-international-shipping.php:
|
58 |
msgid "Origin State"
|
59 |
msgstr ""
|
60 |
|
61 |
-
#: includes/abstracts/abstract-wc-correios-international-shipping.php:
|
62 |
msgid "The UF of the location your packages are delivered from."
|
63 |
msgstr ""
|
64 |
|
65 |
-
#: includes/abstracts/abstract-wc-correios-international-shipping.php:
|
66 |
msgid "Origin Locale"
|
67 |
msgstr ""
|
68 |
|
69 |
-
#: includes/abstracts/abstract-wc-correios-international-shipping.php:
|
70 |
msgid "The location of your packages are delivered from."
|
71 |
msgstr ""
|
72 |
|
73 |
-
#: includes/abstracts/abstract-wc-correios-international-shipping.php:
|
74 |
msgid "Capital"
|
75 |
msgstr ""
|
76 |
|
77 |
-
#: includes/abstracts/abstract-wc-correios-international-shipping.php:
|
78 |
msgid "Interior"
|
79 |
msgstr ""
|
80 |
|
81 |
-
#: includes/abstracts/abstract-wc-correios-international-shipping.php:
|
82 |
#: includes/abstracts/abstract-wc-correios-shipping.php:117
|
83 |
msgid "Delivery Time"
|
84 |
msgstr ""
|
85 |
|
86 |
-
#: includes/abstracts/abstract-wc-correios-international-shipping.php:
|
87 |
#: includes/abstracts/abstract-wc-correios-shipping.php:119
|
88 |
msgid "Show estimated delivery time"
|
89 |
msgstr ""
|
90 |
|
91 |
-
#: includes/abstracts/abstract-wc-correios-international-shipping.php:
|
92 |
#: includes/abstracts/abstract-wc-correios-shipping.php:120
|
93 |
msgid "Display the estimated delivery time in working days."
|
94 |
msgstr ""
|
95 |
|
96 |
-
#: includes/abstracts/abstract-wc-correios-international-shipping.php:
|
97 |
#: includes/abstracts/abstract-wc-correios-shipping.php:133
|
98 |
#: includes/shipping/class-wc-correios-shipping-carta-registrada.php:107
|
99 |
#: includes/shipping/class-wc-correios-shipping-legacy.php:123
|
100 |
msgid "Handling Fee"
|
101 |
msgstr ""
|
102 |
|
103 |
-
#: includes/abstracts/abstract-wc-correios-international-shipping.php:
|
104 |
#: includes/abstracts/abstract-wc-correios-shipping.php:135
|
105 |
#: includes/shipping/class-wc-correios-shipping-carta-registrada.php:109
|
106 |
#: includes/shipping/class-wc-correios-shipping-legacy.php:125
|
@@ -109,38 +109,26 @@ msgid ""
|
|
109 |
"disable."
|
110 |
msgstr ""
|
111 |
|
112 |
-
#: includes/abstracts/abstract-wc-correios-international-shipping.php:
|
113 |
#: includes/abstracts/abstract-wc-correios-shipping.php:141
|
114 |
#: includes/shipping/class-wc-correios-shipping-carta-registrada.php:115
|
115 |
msgid "Optional Services"
|
116 |
msgstr ""
|
117 |
|
118 |
-
#: includes/abstracts/abstract-wc-correios-international-shipping.php:
|
119 |
#: includes/abstracts/abstract-wc-correios-shipping.php:143
|
120 |
#: includes/shipping/class-wc-correios-shipping-carta-registrada.php:117
|
121 |
msgid "Use these options to add the value of each service provided by the Correios."
|
122 |
msgstr ""
|
123 |
|
124 |
-
#: includes/abstracts/abstract-wc-correios-international-shipping.php:
|
125 |
-
msgid "Automatic Insurance"
|
126 |
-
msgstr ""
|
127 |
-
|
128 |
-
#: includes/abstracts/abstract-wc-correios-international-shipping.php:120
|
129 |
-
msgid "Enable automatic insurance"
|
130 |
-
msgstr ""
|
131 |
-
|
132 |
-
#: includes/abstracts/abstract-wc-correios-international-shipping.php:121
|
133 |
-
msgid "This controls if need to apply insurance to the order."
|
134 |
-
msgstr ""
|
135 |
-
|
136 |
-
#: includes/abstracts/abstract-wc-correios-international-shipping.php:126
|
137 |
#: includes/abstracts/abstract-wc-correios-shipping.php:237
|
138 |
#: includes/shipping/class-wc-correios-shipping-carta-registrada.php:137
|
139 |
#: includes/shipping/class-wc-correios-shipping-legacy.php:224
|
140 |
msgid "Testing"
|
141 |
msgstr ""
|
142 |
|
143 |
-
#: includes/abstracts/abstract-wc-correios-international-shipping.php:
|
144 |
#: includes/abstracts/abstract-wc-correios-shipping.php:242
|
145 |
#: includes/integrations/class-wc-correios-integration.php:84
|
146 |
#: includes/integrations/class-wc-correios-integration.php:137
|
@@ -149,14 +137,14 @@ msgstr ""
|
|
149 |
msgid "Debug Log"
|
150 |
msgstr ""
|
151 |
|
152 |
-
#: includes/abstracts/abstract-wc-correios-international-shipping.php:
|
153 |
#: includes/abstracts/abstract-wc-correios-shipping.php:244
|
154 |
#: includes/shipping/class-wc-correios-shipping-carta-registrada.php:144
|
155 |
#: includes/shipping/class-wc-correios-shipping-legacy.php:230
|
156 |
msgid "Enable logging"
|
157 |
msgstr ""
|
158 |
|
159 |
-
#: includes/abstracts/abstract-wc-correios-international-shipping.php:
|
160 |
#: includes/abstracts/abstract-wc-correios-shipping.php:246
|
161 |
#: includes/integrations/class-wc-correios-integration.php:88
|
162 |
#: includes/integrations/class-wc-correios-integration.php:141
|
@@ -247,10 +235,12 @@ msgid "Service code, use this for custom codes."
|
|
247 |
msgstr ""
|
248 |
|
249 |
#: includes/abstracts/abstract-wc-correios-shipping.php:184
|
|
|
250 |
msgid "Service Type"
|
251 |
msgstr ""
|
252 |
|
253 |
#: includes/abstracts/abstract-wc-correios-shipping.php:186
|
|
|
254 |
#: includes/shipping/class-wc-correios-shipping-legacy.php:136
|
255 |
msgid "Choose between conventional or corporate service."
|
256 |
msgstr ""
|
@@ -261,6 +251,7 @@ msgid "Conventional"
|
|
261 |
msgstr ""
|
262 |
|
263 |
#: includes/abstracts/abstract-wc-correios-shipping.php:192
|
|
|
264 |
#: includes/shipping/class-wc-correios-shipping-legacy.php:141
|
265 |
msgid "Corporate"
|
266 |
msgstr ""
|
@@ -358,12 +349,12 @@ msgstr ""
|
|
358 |
msgid "More about %s."
|
359 |
msgstr ""
|
360 |
|
361 |
-
#: includes/class-wc-correios-autofill-addresses.php:
|
362 |
msgid "Missing postcode paramater."
|
363 |
msgstr ""
|
364 |
|
365 |
-
#: includes/class-wc-correios-autofill-addresses.php:
|
366 |
-
#: includes/class-wc-correios-autofill-addresses.php:
|
367 |
msgid "Invalid postcode."
|
368 |
msgstr ""
|
369 |
|
2 |
# This file is distributed under the GPLv2 or later.
|
3 |
msgid ""
|
4 |
msgstr ""
|
5 |
+
"Project-Id-Version: WooCommerce Correios 3.0.6\n"
|
6 |
"Report-Msgid-Bugs-To: https://wordpress.org/plugins/woocommerce-domination/\n"
|
7 |
+
"POT-Creation-Date: 2016-08-20 18:37:13+00:00\n"
|
8 |
"MIME-Version: 1.0\n"
|
9 |
"Content-Type: text/plain; charset=utf-8\n"
|
10 |
"Content-Transfer-Encoding: 8bit\n"
|
17 |
msgid "%s is a international shipping method from Correios."
|
18 |
msgstr ""
|
19 |
|
20 |
+
#: includes/abstracts/abstract-wc-correios-international-shipping.php:56
|
21 |
#: includes/abstracts/abstract-wc-correios-shipping.php:91
|
22 |
#: includes/emails/class-wc-correios-tracking-email.php:50
|
23 |
#: includes/integrations/class-wc-correios-integration.php:78
|
27 |
msgid "Enable/Disable"
|
28 |
msgstr ""
|
29 |
|
30 |
+
#: includes/abstracts/abstract-wc-correios-international-shipping.php:58
|
31 |
#: includes/abstracts/abstract-wc-correios-shipping.php:93
|
32 |
#: includes/shipping/class-wc-correios-shipping-carta-registrada.php:82
|
33 |
#: includes/shipping/class-wc-correios-shipping-legacy.php:81
|
34 |
msgid "Enable this shipping method"
|
35 |
msgstr ""
|
36 |
|
37 |
+
#: includes/abstracts/abstract-wc-correios-international-shipping.php:62
|
38 |
#: includes/abstracts/abstract-wc-correios-shipping.php:97
|
39 |
#: includes/shipping/class-wc-correios-shipping-carta-registrada.php:86
|
40 |
#: includes/shipping/class-wc-correios-shipping-legacy.php:85
|
41 |
msgid "Title"
|
42 |
msgstr ""
|
43 |
|
44 |
+
#: includes/abstracts/abstract-wc-correios-international-shipping.php:64
|
45 |
#: includes/abstracts/abstract-wc-correios-shipping.php:99
|
46 |
#: includes/shipping/class-wc-correios-shipping-carta-registrada.php:88
|
47 |
#: includes/shipping/class-wc-correios-shipping-legacy.php:87
|
48 |
msgid "This controls the title which the user sees during checkout."
|
49 |
msgstr ""
|
50 |
|
51 |
+
#: includes/abstracts/abstract-wc-correios-international-shipping.php:69
|
52 |
#: includes/abstracts/abstract-wc-correios-shipping.php:104
|
53 |
#: includes/shipping/class-wc-correios-shipping-carta-registrada.php:93
|
54 |
msgid "Behavior Options"
|
55 |
msgstr ""
|
56 |
|
57 |
+
#: includes/abstracts/abstract-wc-correios-international-shipping.php:74
|
58 |
msgid "Origin State"
|
59 |
msgstr ""
|
60 |
|
61 |
+
#: includes/abstracts/abstract-wc-correios-international-shipping.php:76
|
62 |
msgid "The UF of the location your packages are delivered from."
|
63 |
msgstr ""
|
64 |
|
65 |
+
#: includes/abstracts/abstract-wc-correios-international-shipping.php:83
|
66 |
msgid "Origin Locale"
|
67 |
msgstr ""
|
68 |
|
69 |
+
#: includes/abstracts/abstract-wc-correios-international-shipping.php:85
|
70 |
msgid "The location of your packages are delivered from."
|
71 |
msgstr ""
|
72 |
|
73 |
+
#: includes/abstracts/abstract-wc-correios-international-shipping.php:90
|
74 |
msgid "Capital"
|
75 |
msgstr ""
|
76 |
|
77 |
+
#: includes/abstracts/abstract-wc-correios-international-shipping.php:91
|
78 |
msgid "Interior"
|
79 |
msgstr ""
|
80 |
|
81 |
+
#: includes/abstracts/abstract-wc-correios-international-shipping.php:95
|
82 |
#: includes/abstracts/abstract-wc-correios-shipping.php:117
|
83 |
msgid "Delivery Time"
|
84 |
msgstr ""
|
85 |
|
86 |
+
#: includes/abstracts/abstract-wc-correios-international-shipping.php:97
|
87 |
#: includes/abstracts/abstract-wc-correios-shipping.php:119
|
88 |
msgid "Show estimated delivery time"
|
89 |
msgstr ""
|
90 |
|
91 |
+
#: includes/abstracts/abstract-wc-correios-international-shipping.php:98
|
92 |
#: includes/abstracts/abstract-wc-correios-shipping.php:120
|
93 |
msgid "Display the estimated delivery time in working days."
|
94 |
msgstr ""
|
95 |
|
96 |
+
#: includes/abstracts/abstract-wc-correios-international-shipping.php:103
|
97 |
#: includes/abstracts/abstract-wc-correios-shipping.php:133
|
98 |
#: includes/shipping/class-wc-correios-shipping-carta-registrada.php:107
|
99 |
#: includes/shipping/class-wc-correios-shipping-legacy.php:123
|
100 |
msgid "Handling Fee"
|
101 |
msgstr ""
|
102 |
|
103 |
+
#: includes/abstracts/abstract-wc-correios-international-shipping.php:105
|
104 |
#: includes/abstracts/abstract-wc-correios-shipping.php:135
|
105 |
#: includes/shipping/class-wc-correios-shipping-carta-registrada.php:109
|
106 |
#: includes/shipping/class-wc-correios-shipping-legacy.php:125
|
109 |
"disable."
|
110 |
msgstr ""
|
111 |
|
112 |
+
#: includes/abstracts/abstract-wc-correios-international-shipping.php:111
|
113 |
#: includes/abstracts/abstract-wc-correios-shipping.php:141
|
114 |
#: includes/shipping/class-wc-correios-shipping-carta-registrada.php:115
|
115 |
msgid "Optional Services"
|
116 |
msgstr ""
|
117 |
|
118 |
+
#: includes/abstracts/abstract-wc-correios-international-shipping.php:113
|
119 |
#: includes/abstracts/abstract-wc-correios-shipping.php:143
|
120 |
#: includes/shipping/class-wc-correios-shipping-carta-registrada.php:117
|
121 |
msgid "Use these options to add the value of each service provided by the Correios."
|
122 |
msgstr ""
|
123 |
|
124 |
+
#: includes/abstracts/abstract-wc-correios-international-shipping.php:117
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
125 |
#: includes/abstracts/abstract-wc-correios-shipping.php:237
|
126 |
#: includes/shipping/class-wc-correios-shipping-carta-registrada.php:137
|
127 |
#: includes/shipping/class-wc-correios-shipping-legacy.php:224
|
128 |
msgid "Testing"
|
129 |
msgstr ""
|
130 |
|
131 |
+
#: includes/abstracts/abstract-wc-correios-international-shipping.php:122
|
132 |
#: includes/abstracts/abstract-wc-correios-shipping.php:242
|
133 |
#: includes/integrations/class-wc-correios-integration.php:84
|
134 |
#: includes/integrations/class-wc-correios-integration.php:137
|
137 |
msgid "Debug Log"
|
138 |
msgstr ""
|
139 |
|
140 |
+
#: includes/abstracts/abstract-wc-correios-international-shipping.php:124
|
141 |
#: includes/abstracts/abstract-wc-correios-shipping.php:244
|
142 |
#: includes/shipping/class-wc-correios-shipping-carta-registrada.php:144
|
143 |
#: includes/shipping/class-wc-correios-shipping-legacy.php:230
|
144 |
msgid "Enable logging"
|
145 |
msgstr ""
|
146 |
|
147 |
+
#: includes/abstracts/abstract-wc-correios-international-shipping.php:126
|
148 |
#: includes/abstracts/abstract-wc-correios-shipping.php:246
|
149 |
#: includes/integrations/class-wc-correios-integration.php:88
|
150 |
#: includes/integrations/class-wc-correios-integration.php:141
|
235 |
msgstr ""
|
236 |
|
237 |
#: includes/abstracts/abstract-wc-correios-shipping.php:184
|
238 |
+
#: includes/shipping/class-wc-correios-shipping-esedex.php:40
|
239 |
msgid "Service Type"
|
240 |
msgstr ""
|
241 |
|
242 |
#: includes/abstracts/abstract-wc-correios-shipping.php:186
|
243 |
+
#: includes/shipping/class-wc-correios-shipping-esedex.php:42
|
244 |
#: includes/shipping/class-wc-correios-shipping-legacy.php:136
|
245 |
msgid "Choose between conventional or corporate service."
|
246 |
msgstr ""
|
251 |
msgstr ""
|
252 |
|
253 |
#: includes/abstracts/abstract-wc-correios-shipping.php:192
|
254 |
+
#: includes/shipping/class-wc-correios-shipping-esedex.php:47
|
255 |
#: includes/shipping/class-wc-correios-shipping-legacy.php:141
|
256 |
msgid "Corporate"
|
257 |
msgstr ""
|
349 |
msgid "More about %s."
|
350 |
msgstr ""
|
351 |
|
352 |
+
#: includes/class-wc-correios-autofill-addresses.php:255
|
353 |
msgid "Missing postcode paramater."
|
354 |
msgstr ""
|
355 |
|
356 |
+
#: includes/class-wc-correios-autofill-addresses.php:262
|
357 |
+
#: includes/class-wc-correios-autofill-addresses.php:269
|
358 |
msgid "Invalid postcode."
|
359 |
msgstr ""
|
360 |
|
readme.txt
CHANGED
@@ -4,7 +4,7 @@ Donate link: http://claudiosmweb.com/doacoes/
|
|
4 |
Tags: shipping, delivery, woocommerce, correios
|
5 |
Requires at least: 4.0
|
6 |
Tested up to: 4.6
|
7 |
-
Stable tag: 3.0.
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
@@ -199,6 +199,12 @@ Em caso de dúvidas, basta abrir um tópico no [fórum de suporte do plugin](htt
|
|
199 |
|
200 |
== Changelog ==
|
201 |
|
|
|
|
|
|
|
|
|
|
|
|
|
202 |
= 3.0.5 - 2016/07/20 =
|
203 |
|
204 |
- Corrigido o formato das dimensões e peso para os métodos de entrega internacionais.
|
@@ -233,7 +239,7 @@ Em caso de dúvidas, basta abrir um tópico no [fórum de suporte do plugin](htt
|
|
233 |
|
234 |
== Upgrade Notice ==
|
235 |
|
236 |
-
= 3.0.
|
237 |
|
238 |
- Reformulação geral de todos o código do plugin.
|
239 |
- Adicionado suporte as áreas de entrega do WooCommerce 2.6.
|
4 |
Tags: shipping, delivery, woocommerce, correios
|
5 |
Requires at least: 4.0
|
6 |
Tested up to: 4.6
|
7 |
+
Stable tag: 3.0.6
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
199 |
|
200 |
== Changelog ==
|
201 |
|
202 |
+
= 3.0.6 - 2016/08/20 =
|
203 |
+
|
204 |
+
- Introduzida a função `wc_correios_get_address_by_postcode()`.
|
205 |
+
- Removida opção de seguro para métodos internacionais, pois o valor adicionado era o valor do premio do seguro automático.
|
206 |
+
- Corrigido e-Sedex para aceitar apenas a opção corporativa.
|
207 |
+
|
208 |
= 3.0.5 - 2016/07/20 =
|
209 |
|
210 |
- Corrigido o formato das dimensões e peso para os métodos de entrega internacionais.
|
239 |
|
240 |
== Upgrade Notice ==
|
241 |
|
242 |
+
= 3.0.6 =
|
243 |
|
244 |
- Reformulação geral de todos o código do plugin.
|
245 |
- Adicionado suporte as áreas de entrega do WooCommerce 2.6.
|
woocommerce-correios.php
CHANGED
@@ -5,7 +5,7 @@
|
|
5 |
* Description: Correios para WooCommerce
|
6 |
* Author: Claudio Sanches
|
7 |
* Author URI: http://claudiosmweb.com/
|
8 |
-
* Version: 3.0.
|
9 |
* License: GPLv2 or later
|
10 |
* Text Domain: woocommerce-correios
|
11 |
* Domain Path: languages/
|
@@ -29,7 +29,7 @@ if ( ! class_exists( 'WC_Correios' ) ) :
|
|
29 |
*
|
30 |
* @var string
|
31 |
*/
|
32 |
-
const VERSION = '3.0.
|
33 |
|
34 |
/**
|
35 |
* Instance of this class.
|
5 |
* Description: Correios para WooCommerce
|
6 |
* Author: Claudio Sanches
|
7 |
* Author URI: http://claudiosmweb.com/
|
8 |
+
* Version: 3.0.6
|
9 |
* License: GPLv2 or later
|
10 |
* Text Domain: woocommerce-correios
|
11 |
* Domain Path: languages/
|
29 |
*
|
30 |
* @var string
|
31 |
*/
|
32 |
+
const VERSION = '3.0.6';
|
33 |
|
34 |
/**
|
35 |
* Instance of this class.
|