WooCommerce Correios - Version 3.7.0

Version Description

  • 2018/05/08 =

  • Atualizados os valores do Impresso e Carta, mais detalhes em #97 e #100.

  • Adicionada opo para peso extra nos mtodos de Impresso e Carta, mais detalhes em #95.

  • Adicionada opes para usar rastreamento com dados administrativos.

  • Melhorado a exibio e salvamento da estimativa de entrega, mais detalhes em #98

See changelog for all versions.

=

Download this release

Release Info

Developer claudiosanches
Plugin Icon 128x128 WooCommerce Correios
Version 3.7.0
Comparing to
See all releases

Code changes from version 3.6.0 to 3.7.0

includes/abstracts/{abstract-wc-correios-shipping-carta.php → class-wc-correios-shipping-carta.php} RENAMED
@@ -38,6 +38,7 @@ abstract class WC_Correios_Shipping_Carta extends WC_Correios_Shipping {
38
  $this->shipping_class = $this->get_option( 'shipping_class' );
39
  $this->show_delivery_time = $this->get_option( 'show_delivery_time' );
40
  $this->additional_time = $this->get_option( 'additional_time' );
 
41
  $this->fee = $this->get_option( 'fee' );
42
  $this->receipt_notice = $this->get_option( 'receipt_notice' );
43
  $this->own_hands = $this->get_option( 'own_hands' );
@@ -118,6 +119,13 @@ abstract class WC_Correios_Shipping_Carta extends WC_Correios_Shipping {
118
  'default' => '0',
119
  'placeholder' => '0',
120
  ),
 
 
 
 
 
 
 
121
  'fee' => array(
122
  'title' => __( 'Handling Fee', 'woocommerce-correios' ),
123
  'type' => 'price',
@@ -254,7 +262,7 @@ abstract class WC_Correios_Shipping_Carta extends WC_Correios_Shipping {
254
  // Create the rate and apply filters.
255
  $rate = apply_filters( 'woocommerce_correios_' . $this->id . '_rate', array(
256
  'id' => $this->id . $this->instance_id,
257
- 'label' => $this->get_shipping_method_label( (int) $this->get_shipping_time( $package ), $package ),
258
  'cost' => (float) $cost + (float) $fee,
259
  ), $this->instance_id, $package );
260
 
38
  $this->shipping_class = $this->get_option( 'shipping_class' );
39
  $this->show_delivery_time = $this->get_option( 'show_delivery_time' );
40
  $this->additional_time = $this->get_option( 'additional_time' );
41
+ $this->extra_weight = $this->get_option( 'extra_weight', '0' );
42
  $this->fee = $this->get_option( 'fee' );
43
  $this->receipt_notice = $this->get_option( 'receipt_notice' );
44
  $this->own_hands = $this->get_option( 'own_hands' );
119
  'default' => '0',
120
  'placeholder' => '0',
121
  ),
122
+ 'extra_weight' => array(
123
+ 'title' => __( 'Extra Weight (g)', 'woocommerce-correios' ),
124
+ 'type' => 'text',
125
+ 'description' => __( 'Extra weight in grams to add to the package total when quoting shipping costs.', 'woocommerce-correios' ),
126
+ 'desc_tip' => true,
127
+ 'default' => '0',
128
+ ),
129
  'fee' => array(
130
  'title' => __( 'Handling Fee', 'woocommerce-correios' ),
131
  'type' => 'price',
262
  // Create the rate and apply filters.
263
  $rate = apply_filters( 'woocommerce_correios_' . $this->id . '_rate', array(
264
  'id' => $this->id . $this->instance_id,
265
+ 'label' => $this->title,
266
  'cost' => (float) $cost + (float) $fee,
267
  ), $this->instance_id, $package );
268
 
includes/abstracts/{abstract-wc-correios-shipping-impresso.php → class-wc-correios-shipping-impresso.php} RENAMED
@@ -21,42 +21,42 @@ abstract class WC_Correios_Shipping_Impresso extends WC_Correios_Shipping_Carta
21
  /**
22
  * National Registry cost.
23
  *
24
- * Cost based in 01/10/2016 from:
25
  * http://www.correios.com.br/para-voce/consultas-e-solicitacoes/precos-e-prazos/servicos-adicionais-nacionais
26
  *
27
  * @var float
28
  */
29
- protected $national_registry_cost = 4.30;
30
 
31
  /**
32
  * Reasonable Registry cost.
33
  *
34
- * Cost based in 01/10/2016 from:
35
  * http://www.correios.com.br/para-voce/consultas-e-solicitacoes/precos-e-prazos/servicos-adicionais-nacionais
36
  *
37
  * @var float
38
  */
39
- protected $reasonable_registry_cost = 2.15;
40
 
41
  /**
42
  * Receipt Notice cost.
43
  *
44
- * Cost based in 01/10/2016 from:
45
  * https://www.correios.com.br/para-voce/consultas-e-solicitacoes/precos-e-prazos/servicos-adicionais-nacionais
46
  *
47
  * @var float
48
  */
49
- protected $receipt_notice_cost = 4.30;
50
 
51
  /**
52
  * Own Hands cost.
53
  *
54
- * Cost based in 01/10/2016 from:
55
  * https://www.correios.com.br/para-voce/consultas-e-solicitacoes/precos-e-prazos/servicos-adicionais-nacionais
56
  *
57
  * @var float
58
  */
59
- protected $own_hands_cost = 5.50;
60
 
61
  /**
62
  * Weight limit for reasonable registry.
@@ -91,6 +91,7 @@ abstract class WC_Correios_Shipping_Impresso extends WC_Correios_Shipping_Carta
91
  $this->registry_type = $this->get_option( 'registry_type' );
92
  $this->show_delivery_time = $this->get_option( 'show_delivery_time' );
93
  $this->additional_time = $this->get_option( 'additional_time' );
 
94
  $this->fee = $this->get_option( 'fee' );
95
  $this->receipt_notice = $this->get_option( 'receipt_notice' );
96
  $this->own_hands = $this->get_option( 'own_hands' );
@@ -167,6 +168,13 @@ abstract class WC_Correios_Shipping_Impresso extends WC_Correios_Shipping_Carta
167
  'default' => '0',
168
  'placeholder' => '0',
169
  ),
 
 
 
 
 
 
 
170
  'fee' => array(
171
  'title' => __( 'Handling Fee', 'woocommerce-correios' ),
172
  'type' => 'price',
21
  /**
22
  * National Registry cost.
23
  *
24
+ * Cost based in 31/07/2017 from:
25
  * http://www.correios.com.br/para-voce/consultas-e-solicitacoes/precos-e-prazos/servicos-adicionais-nacionais
26
  *
27
  * @var float
28
  */
29
+ protected $national_registry_cost = 5.00;
30
 
31
  /**
32
  * Reasonable Registry cost.
33
  *
34
+ * Cost based in 31/07/2017 from:
35
  * http://www.correios.com.br/para-voce/consultas-e-solicitacoes/precos-e-prazos/servicos-adicionais-nacionais
36
  *
37
  * @var float
38
  */
39
+ protected $reasonable_registry_cost = 2.50;
40
 
41
  /**
42
  * Receipt Notice cost.
43
  *
44
+ * Cost based in 31/07/2017 from:
45
  * https://www.correios.com.br/para-voce/consultas-e-solicitacoes/precos-e-prazos/servicos-adicionais-nacionais
46
  *
47
  * @var float
48
  */
49
+ protected $receipt_notice_cost = 5.00;
50
 
51
  /**
52
  * Own Hands cost.
53
  *
54
+ * Cost based in 31/07/2017 from:
55
  * https://www.correios.com.br/para-voce/consultas-e-solicitacoes/precos-e-prazos/servicos-adicionais-nacionais
56
  *
57
  * @var float
58
  */
59
+ protected $own_hands_cost = 5.90;
60
 
61
  /**
62
  * Weight limit for reasonable registry.
91
  $this->registry_type = $this->get_option( 'registry_type' );
92
  $this->show_delivery_time = $this->get_option( 'show_delivery_time' );
93
  $this->additional_time = $this->get_option( 'additional_time' );
94
+ $this->extra_weight = $this->get_option( 'extra_weight', '0' );
95
  $this->fee = $this->get_option( 'fee' );
96
  $this->receipt_notice = $this->get_option( 'receipt_notice' );
97
  $this->own_hands = $this->get_option( 'own_hands' );
168
  'default' => '0',
169
  'placeholder' => '0',
170
  ),
171
+ 'extra_weight' => array(
172
+ 'title' => __( 'Extra Weight (g)', 'woocommerce-correios' ),
173
+ 'type' => 'text',
174
+ 'description' => __( 'Extra weight in grams to add to the package total when quoting shipping costs.', 'woocommerce-correios' ),
175
+ 'desc_tip' => true,
176
+ 'default' => '0',
177
+ ),
178
  'fee' => array(
179
  'title' => __( 'Handling Fee', 'woocommerce-correios' ),
180
  'type' => 'price',
includes/abstracts/{abstract-wc-correios-shipping-international.php → class-wc-correios-shipping-international.php} RENAMED
File without changes
includes/abstracts/{abstract-wc-correios-shipping.php → class-wc-correios-shipping.php} RENAMED
@@ -38,7 +38,8 @@ abstract class WC_Correios_Shipping extends WC_Shipping_Method {
38
  * @param int $instance_id Shipping zone instance ID.
39
  */
40
  public function __construct( $instance_id = 0 ) {
41
- $this->instance_id = absint( $instance_id );
 
42
  $this->method_description = sprintf( __( '%s is a shipping method from Correios.', 'woocommerce-correios' ), $this->method_title );
43
  $this->supports = array(
44
  'shipping-zones',
@@ -121,25 +122,25 @@ abstract class WC_Correios_Shipping extends WC_Shipping_Method {
121
  */
122
  public function init_form_fields() {
123
  $this->instance_form_fields = array(
124
- 'enabled' => array(
125
  'title' => __( 'Enable/Disable', 'woocommerce-correios' ),
126
  'type' => 'checkbox',
127
  'label' => __( 'Enable this shipping method', 'woocommerce-correios' ),
128
  'default' => 'yes',
129
  ),
130
- 'title' => array(
131
  'title' => __( 'Title', 'woocommerce-correios' ),
132
  'type' => 'text',
133
  'description' => __( 'This controls the title which the user sees during checkout.', 'woocommerce-correios' ),
134
  'desc_tip' => true,
135
  'default' => $this->method_title,
136
  ),
137
- 'behavior_options' => array(
138
  'title' => __( 'Behavior Options', 'woocommerce-correios' ),
139
  'type' => 'title',
140
  'default' => '',
141
  ),
142
- 'origin_postcode' => array(
143
  'title' => __( 'Origin Postcode', 'woocommerce-correios' ),
144
  'type' => 'text',
145
  'description' => __( 'The postcode of the location your packages are delivered from.', 'woocommerce-correios' ),
@@ -147,7 +148,7 @@ abstract class WC_Correios_Shipping extends WC_Shipping_Method {
147
  'placeholder' => '00000-000',
148
  'default' => $this->get_base_postcode(),
149
  ),
150
- 'shipping_class_id' => array(
151
  'title' => __( 'Shipping Class', 'woocommerce-correios' ),
152
  'type' => 'select',
153
  'description' => __( 'If necessary, select a shipping class to apply this method.', 'woocommerce-correios' ),
@@ -164,7 +165,7 @@ abstract class WC_Correios_Shipping extends WC_Shipping_Method {
164
  'desc_tip' => true,
165
  'default' => 'no',
166
  ),
167
- 'additional_time' => array(
168
  'title' => __( 'Additional Days', 'woocommerce-correios' ),
169
  'type' => 'text',
170
  'description' => __( 'Additional working days to the estimated delivery.', 'woocommerce-correios' ),
@@ -172,7 +173,7 @@ abstract class WC_Correios_Shipping extends WC_Shipping_Method {
172
  'default' => '0',
173
  'placeholder' => '0',
174
  ),
175
- 'fee' => array(
176
  'title' => __( 'Handling Fee', 'woocommerce-correios' ),
177
  'type' => 'price',
178
  'description' => __( 'Enter an amount, e.g. 2.50, or a percentage, e.g. 5%. Leave blank to disable.', 'woocommerce-correios' ),
@@ -180,13 +181,13 @@ abstract class WC_Correios_Shipping extends WC_Shipping_Method {
180
  'placeholder' => '0.00',
181
  'default' => '',
182
  ),
183
- 'optional_services' => array(
184
  'title' => __( 'Optional Services', 'woocommerce-correios' ),
185
  'type' => 'title',
186
  'description' => __( 'Use these options to add the value of each service provided by the Correios.', 'woocommerce-correios' ),
187
  'default' => '',
188
  ),
189
- 'receipt_notice' => array(
190
  'title' => __( 'Receipt Notice', 'woocommerce-correios' ),
191
  'type' => 'checkbox',
192
  'label' => __( 'Enable receipt notice', 'woocommerce-correios' ),
@@ -194,7 +195,7 @@ abstract class WC_Correios_Shipping extends WC_Shipping_Method {
194
  'desc_tip' => true,
195
  'default' => 'no',
196
  ),
197
- 'own_hands' => array(
198
  'title' => __( 'Own Hands', 'woocommerce-correios' ),
199
  'type' => 'checkbox',
200
  'label' => __( 'Enable own hands', 'woocommerce-correios' ),
@@ -202,7 +203,7 @@ abstract class WC_Correios_Shipping extends WC_Shipping_Method {
202
  'desc_tip' => true,
203
  'default' => 'no',
204
  ),
205
- 'declare_value' => array(
206
  'title' => __( 'Declare Value for Insurance', 'woocommerce-correios' ),
207
  'type' => 'checkbox',
208
  'label' => __( 'Enable declared value', 'woocommerce-correios' ),
@@ -210,12 +211,12 @@ abstract class WC_Correios_Shipping extends WC_Shipping_Method {
210
  'desc_tip' => true,
211
  'default' => 'yes',
212
  ),
213
- 'service_options' => array(
214
  'title' => __( 'Service Options', 'woocommerce-correios' ),
215
  'type' => 'title',
216
  'default' => '',
217
  ),
218
- 'custom_code' => array(
219
  'title' => __( 'Service Code', 'woocommerce-correios' ),
220
  'type' => 'text',
221
  'description' => __( 'Service code, use this for custom codes.', 'woocommerce-correios' ),
@@ -223,7 +224,7 @@ abstract class WC_Correios_Shipping extends WC_Shipping_Method {
223
  'placeholder' => $this->code,
224
  'default' => '',
225
  ),
226
- 'service_type' => array(
227
  'title' => __( 'Service Type', 'woocommerce-correios' ),
228
  'type' => 'select',
229
  'description' => __( 'Choose between conventional or corporate service.', 'woocommerce-correios' ),
@@ -235,64 +236,65 @@ abstract class WC_Correios_Shipping extends WC_Shipping_Method {
235
  'corporate' => __( 'Corporate', 'woocommerce-correios' ),
236
  ),
237
  ),
238
- 'login' => array(
239
  'title' => __( 'Administrative Code', 'woocommerce-correios' ),
240
  'type' => 'text',
241
  'description' => __( 'Your Correios login. It\'s usually your CNPJ.', 'woocommerce-correios' ),
242
  'desc_tip' => true,
243
  'default' => '',
244
  ),
245
- 'password' => array(
246
  'title' => __( 'Administrative Password', 'woocommerce-correios' ),
247
  'type' => 'text',
248
  'description' => __( 'Your Correios password.', 'woocommerce-correios' ),
249
  'desc_tip' => true,
250
  'default' => '',
251
  ),
252
- 'package_standard' => array(
253
  'title' => __( 'Package Standard', 'woocommerce-correios' ),
254
  'type' => 'title',
255
  'description' => __( 'Minimum measure for your shipping packages.', 'woocommerce-correios' ),
256
  'default' => '',
257
  ),
258
- 'minimum_height' => array(
259
  'title' => __( 'Minimum Height (cm)', 'woocommerce-correios' ),
260
  'type' => 'text',
261
  'description' => __( 'Minimum height of your shipping packages. Correios needs at least 2cm.', 'woocommerce-correios' ),
262
  'desc_tip' => true,
263
  'default' => '2',
264
  ),
265
- 'minimum_width' => array(
266
  'title' => __( 'Minimum Width (cm)', 'woocommerce-correios' ),
267
  'type' => 'text',
268
  'description' => __( 'Minimum width of your shipping packages. Correios needs at least 11cm.', 'woocommerce-correios' ),
269
  'desc_tip' => true,
270
  'default' => '11',
271
  ),
272
- 'minimum_length' => array(
273
  'title' => __( 'Minimum Length (cm)', 'woocommerce-correios' ),
274
  'type' => 'text',
275
  'description' => __( 'Minimum length of your shipping packages. Correios needs at least 16cm.', 'woocommerce-correios' ),
276
  'desc_tip' => true,
277
  'default' => '16',
278
  ),
279
- 'extra_weight' => array(
280
  'title' => __( 'Extra Weight (kg)', 'woocommerce-correios' ),
281
  'type' => 'text',
282
  'description' => __( 'Extra weight in kilograms to add to the package total when quoting shipping costs.', 'woocommerce-correios' ),
283
  'desc_tip' => true,
284
  'default' => '0',
285
  ),
286
- 'testing' => array(
287
  'title' => __( 'Testing', 'woocommerce-correios' ),
288
  'type' => 'title',
289
  'default' => '',
290
  ),
291
- 'debug' => array(
292
  'title' => __( 'Debug Log', 'woocommerce-correios' ),
293
  'type' => 'checkbox',
294
  'label' => __( 'Enable logging', 'woocommerce-correios' ),
295
  'default' => 'no',
 
296
  'description' => sprintf( __( 'Log %s events, such as WebServices requests.', 'woocommerce-correios' ), $this->method_title ) . $this->get_log_link(),
297
  ),
298
  );
@@ -312,7 +314,7 @@ abstract class WC_Correios_Shipping extends WC_Shipping_Method {
312
  * Includes "%" back.
313
  *
314
  * @param string $key Field key.
315
- * @param string $value Posted value/
316
  * @return string
317
  */
318
  public function validate_price_field( $key, $value ) {
@@ -439,22 +441,6 @@ abstract class WC_Correios_Shipping extends WC_Shipping_Method {
439
  return $codes;
440
  }
441
 
442
- /**
443
- * Get shipping method label.
444
- *
445
- * @param int $days Days to deliver.
446
- * @param array $package Package data.
447
- *
448
- * @return string
449
- */
450
- protected function get_shipping_method_label( $days, $package ) {
451
- if ( 'yes' === $this->show_delivery_time ) {
452
- return wc_correios_get_estimating_delivery( $this->title, $days, $this->get_additional_time( $package ) );
453
- }
454
-
455
- return $this->title;
456
- }
457
-
458
  /**
459
  * Check if package uses only the selected shipping class.
460
  *
@@ -501,11 +487,11 @@ abstract class WC_Correios_Shipping extends WC_Shipping_Method {
501
 
502
  $shipping = $this->get_rate( $package );
503
 
504
- if ( ! isset( $shipping->Erro ) ) {
505
  return;
506
  }
507
 
508
- $error_number = (string) $shipping->Erro;
509
 
510
  // Exit if have errors.
511
  if ( ! in_array( $error_number, $this->get_accepted_error_codes(), true ) ) {
@@ -521,8 +507,8 @@ abstract class WC_Correios_Shipping extends WC_Shipping_Method {
521
  }
522
 
523
  // Set the shipping rates.
524
- $label = $this->get_shipping_method_label( (int) $shipping->PrazoEntrega, $package );
525
- $cost = wc_correios_normalize_price( esc_attr( (string) $shipping->Valor ) );
526
 
527
  // Exit if don't have price.
528
  if ( 0 === intval( $cost ) ) {
@@ -532,12 +518,23 @@ abstract class WC_Correios_Shipping extends WC_Shipping_Method {
532
  // Apply fees.
533
  $fee = $this->get_fee( $this->fee, $cost );
534
 
 
 
 
 
 
 
 
 
535
  // Create the rate and apply filters.
536
- $rate = apply_filters( 'woocommerce_correios_' . $this->id . '_rate', array(
537
- 'id' => $this->id . $this->instance_id,
538
- 'label' => $label,
539
- 'cost' => (float) $cost + (float) $fee,
540
- ), $this->instance_id, $package );
 
 
 
541
 
542
  // Deprecated filter.
543
  $rates = apply_filters( 'woocommerce_correios_shipping_methods', array( $rate ), $package );
38
  * @param int $instance_id Shipping zone instance ID.
39
  */
40
  public function __construct( $instance_id = 0 ) {
41
+ $this->instance_id = absint( $instance_id );
42
+ /* translators: %s: method title */
43
  $this->method_description = sprintf( __( '%s is a shipping method from Correios.', 'woocommerce-correios' ), $this->method_title );
44
  $this->supports = array(
45
  'shipping-zones',
122
  */
123
  public function init_form_fields() {
124
  $this->instance_form_fields = array(
125
+ 'enabled' => array(
126
  'title' => __( 'Enable/Disable', 'woocommerce-correios' ),
127
  'type' => 'checkbox',
128
  'label' => __( 'Enable this shipping method', 'woocommerce-correios' ),
129
  'default' => 'yes',
130
  ),
131
+ 'title' => array(
132
  'title' => __( 'Title', 'woocommerce-correios' ),
133
  'type' => 'text',
134
  'description' => __( 'This controls the title which the user sees during checkout.', 'woocommerce-correios' ),
135
  'desc_tip' => true,
136
  'default' => $this->method_title,
137
  ),
138
+ 'behavior_options' => array(
139
  'title' => __( 'Behavior Options', 'woocommerce-correios' ),
140
  'type' => 'title',
141
  'default' => '',
142
  ),
143
+ 'origin_postcode' => array(
144
  'title' => __( 'Origin Postcode', 'woocommerce-correios' ),
145
  'type' => 'text',
146
  'description' => __( 'The postcode of the location your packages are delivered from.', 'woocommerce-correios' ),
148
  'placeholder' => '00000-000',
149
  'default' => $this->get_base_postcode(),
150
  ),
151
+ 'shipping_class_id' => array(
152
  'title' => __( 'Shipping Class', 'woocommerce-correios' ),
153
  'type' => 'select',
154
  'description' => __( 'If necessary, select a shipping class to apply this method.', 'woocommerce-correios' ),
165
  'desc_tip' => true,
166
  'default' => 'no',
167
  ),
168
+ 'additional_time' => array(
169
  'title' => __( 'Additional Days', 'woocommerce-correios' ),
170
  'type' => 'text',
171
  'description' => __( 'Additional working days to the estimated delivery.', 'woocommerce-correios' ),
173
  'default' => '0',
174
  'placeholder' => '0',
175
  ),
176
+ 'fee' => array(
177
  'title' => __( 'Handling Fee', 'woocommerce-correios' ),
178
  'type' => 'price',
179
  'description' => __( 'Enter an amount, e.g. 2.50, or a percentage, e.g. 5%. Leave blank to disable.', 'woocommerce-correios' ),
181
  'placeholder' => '0.00',
182
  'default' => '',
183
  ),
184
+ 'optional_services' => array(
185
  'title' => __( 'Optional Services', 'woocommerce-correios' ),
186
  'type' => 'title',
187
  'description' => __( 'Use these options to add the value of each service provided by the Correios.', 'woocommerce-correios' ),
188
  'default' => '',
189
  ),
190
+ 'receipt_notice' => array(
191
  'title' => __( 'Receipt Notice', 'woocommerce-correios' ),
192
  'type' => 'checkbox',
193
  'label' => __( 'Enable receipt notice', 'woocommerce-correios' ),
195
  'desc_tip' => true,
196
  'default' => 'no',
197
  ),
198
+ 'own_hands' => array(
199
  'title' => __( 'Own Hands', 'woocommerce-correios' ),
200
  'type' => 'checkbox',
201
  'label' => __( 'Enable own hands', 'woocommerce-correios' ),
203
  'desc_tip' => true,
204
  'default' => 'no',
205
  ),
206
+ 'declare_value' => array(
207
  'title' => __( 'Declare Value for Insurance', 'woocommerce-correios' ),
208
  'type' => 'checkbox',
209
  'label' => __( 'Enable declared value', 'woocommerce-correios' ),
211
  'desc_tip' => true,
212
  'default' => 'yes',
213
  ),
214
+ 'service_options' => array(
215
  'title' => __( 'Service Options', 'woocommerce-correios' ),
216
  'type' => 'title',
217
  'default' => '',
218
  ),
219
+ 'custom_code' => array(
220
  'title' => __( 'Service Code', 'woocommerce-correios' ),
221
  'type' => 'text',
222
  'description' => __( 'Service code, use this for custom codes.', 'woocommerce-correios' ),
224
  'placeholder' => $this->code,
225
  'default' => '',
226
  ),
227
+ 'service_type' => array(
228
  'title' => __( 'Service Type', 'woocommerce-correios' ),
229
  'type' => 'select',
230
  'description' => __( 'Choose between conventional or corporate service.', 'woocommerce-correios' ),
236
  'corporate' => __( 'Corporate', 'woocommerce-correios' ),
237
  ),
238
  ),
239
+ 'login' => array(
240
  'title' => __( 'Administrative Code', 'woocommerce-correios' ),
241
  'type' => 'text',
242
  'description' => __( 'Your Correios login. It\'s usually your CNPJ.', 'woocommerce-correios' ),
243
  'desc_tip' => true,
244
  'default' => '',
245
  ),
246
+ 'password' => array(
247
  'title' => __( 'Administrative Password', 'woocommerce-correios' ),
248
  'type' => 'text',
249
  'description' => __( 'Your Correios password.', 'woocommerce-correios' ),
250
  'desc_tip' => true,
251
  'default' => '',
252
  ),
253
+ 'package_standard' => array(
254
  'title' => __( 'Package Standard', 'woocommerce-correios' ),
255
  'type' => 'title',
256
  'description' => __( 'Minimum measure for your shipping packages.', 'woocommerce-correios' ),
257
  'default' => '',
258
  ),
259
+ 'minimum_height' => array(
260
  'title' => __( 'Minimum Height (cm)', 'woocommerce-correios' ),
261
  'type' => 'text',
262
  'description' => __( 'Minimum height of your shipping packages. Correios needs at least 2cm.', 'woocommerce-correios' ),
263
  'desc_tip' => true,
264
  'default' => '2',
265
  ),
266
+ 'minimum_width' => array(
267
  'title' => __( 'Minimum Width (cm)', 'woocommerce-correios' ),
268
  'type' => 'text',
269
  'description' => __( 'Minimum width of your shipping packages. Correios needs at least 11cm.', 'woocommerce-correios' ),
270
  'desc_tip' => true,
271
  'default' => '11',
272
  ),
273
+ 'minimum_length' => array(
274
  'title' => __( 'Minimum Length (cm)', 'woocommerce-correios' ),
275
  'type' => 'text',
276
  'description' => __( 'Minimum length of your shipping packages. Correios needs at least 16cm.', 'woocommerce-correios' ),
277
  'desc_tip' => true,
278
  'default' => '16',
279
  ),
280
+ 'extra_weight' => array(
281
  'title' => __( 'Extra Weight (kg)', 'woocommerce-correios' ),
282
  'type' => 'text',
283
  'description' => __( 'Extra weight in kilograms to add to the package total when quoting shipping costs.', 'woocommerce-correios' ),
284
  'desc_tip' => true,
285
  'default' => '0',
286
  ),
287
+ 'testing' => array(
288
  'title' => __( 'Testing', 'woocommerce-correios' ),
289
  'type' => 'title',
290
  'default' => '',
291
  ),
292
+ 'debug' => array(
293
  'title' => __( 'Debug Log', 'woocommerce-correios' ),
294
  'type' => 'checkbox',
295
  'label' => __( 'Enable logging', 'woocommerce-correios' ),
296
  'default' => 'no',
297
+ /* translators: %s: method title */
298
  'description' => sprintf( __( 'Log %s events, such as WebServices requests.', 'woocommerce-correios' ), $this->method_title ) . $this->get_log_link(),
299
  ),
300
  );
314
  * Includes "%" back.
315
  *
316
  * @param string $key Field key.
317
+ * @param string $value Posted value.
318
  * @return string
319
  */
320
  public function validate_price_field( $key, $value ) {
441
  return $codes;
442
  }
443
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
444
  /**
445
  * Check if package uses only the selected shipping class.
446
  *
487
 
488
  $shipping = $this->get_rate( $package );
489
 
490
+ if ( ! isset( $shipping->Erro ) ) { // phpcs:ignore WordPress.NamingConventions.ValidVariableName.NotSnakeCaseMemberVar
491
  return;
492
  }
493
 
494
+ $error_number = (string) $shipping->Erro; // phpcs:ignore WordPress.NamingConventions.ValidVariableName.NotSnakeCaseMemberVar
495
 
496
  // Exit if have errors.
497
  if ( ! in_array( $error_number, $this->get_accepted_error_codes(), true ) ) {
507
  }
508
 
509
  // Set the shipping rates.
510
+ $label = $this->title;
511
+ $cost = wc_correios_normalize_price( esc_attr( (string) $shipping->Valor ) ); // phpcs:ignore WordPress.NamingConventions.ValidVariableName.NotSnakeCaseMemberVar
512
 
513
  // Exit if don't have price.
514
  if ( 0 === intval( $cost ) ) {
518
  // Apply fees.
519
  $fee = $this->get_fee( $this->fee, $cost );
520
 
521
+ // Display delivery.
522
+ $meta_delivery = array();
523
+ if ( 'yes' === $this->show_delivery_time ) {
524
+ $meta_delivery = array(
525
+ '_delivery_forecast' => intval( $shipping->PrazoEntrega ) + intval( $this->get_additional_time( $package ) ), // phpcs:ignore WordPress.NamingConventions.ValidVariableName.NotSnakeCaseMemberVar
526
+ );
527
+ }
528
+
529
  // Create the rate and apply filters.
530
+ $rate = apply_filters(
531
+ 'woocommerce_correios_' . $this->id . '_rate', array(
532
+ 'id' => $this->id . $this->instance_id,
533
+ 'label' => $label,
534
+ 'cost' => (float) $cost + (float) $fee,
535
+ 'meta_data' => $meta_delivery,
536
+ ), $this->instance_id, $package
537
+ );
538
 
539
  // Deprecated filter.
540
  $rates = apply_filters( 'woocommerce_correios_shipping_methods', array( $rate ), $package );
includes/class-wc-correios-cart.php ADDED
@@ -0,0 +1,40 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * WooCommerce cart integration
4
+ *
5
+ * @package WooCommerce_Correios/Classes/Cart
6
+ * @since 3.7.0
7
+ * @version 3.7.0
8
+ */
9
+
10
+ defined( 'ABSPATH' ) || exit;
11
+
12
+ /**
13
+ * Cart integration.
14
+ */
15
+ class WC_Correios_Cart {
16
+
17
+ /**
18
+ * Init cart actions.
19
+ */
20
+ public function __construct() {
21
+ add_action( 'woocommerce_after_shipping_rate', array( $this, 'shipping_delivery_forecast' ), 100 );
22
+ }
23
+
24
+ /**
25
+ * Adds delivery forecast after method name.
26
+ *
27
+ * @param WC_Shipping_Rate $shipping_method Shipping method data.
28
+ */
29
+ public function shipping_delivery_forecast( $shipping_method ) {
30
+ $meta_data = $shipping_method->get_meta_data();
31
+ $total = isset( $meta_data['_delivery_forecast'] ) ? intval( $meta_data['_delivery_forecast'] ) : 0;
32
+
33
+ if ( $total ) {
34
+ /* translators: %d: days to delivery */
35
+ echo '<p><small>' . esc_html( sprintf( _n( 'Delivery within %d working day', 'Delivery within %d working days', $total, 'woocommerce-correios' ), $total ) ) . '</small></p>';
36
+ }
37
+ }
38
+ }
39
+
40
+ new WC_Correios_Cart();
includes/class-wc-correios-orders.php ADDED
@@ -0,0 +1,61 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * WooCommerce orders integration
4
+ *
5
+ * @package WooCommerce_Correios/Classes/Orders
6
+ * @since 3.7.0
7
+ * @version 3.7.0
8
+ */
9
+
10
+ defined( 'ABSPATH' ) || exit;
11
+
12
+ /**
13
+ * Orders integration.
14
+ */
15
+ class WC_Correios_Orders {
16
+
17
+ /**
18
+ * Init orders actions.
19
+ */
20
+ public function __construct() {
21
+ add_filter( 'woocommerce_order_shipping_method', array( $this, 'shipping_method_delivery_forecast' ), 100, 2 );
22
+ add_filter( 'woocommerce_order_item_display_meta_key', array( $this, 'item_display_delivery_forecast' ), 100, 2 );
23
+ }
24
+
25
+ /**
26
+ * Append delivery forecast in shipping method name.
27
+ *
28
+ * @param string $name Method name.
29
+ * @param WC_Order $order Order data.
30
+ * @return string
31
+ */
32
+ public function shipping_method_delivery_forecast( $name, $order ) {
33
+ $names = array();
34
+
35
+ foreach ( $order->get_shipping_methods() as $shipping_method ) {
36
+ $total = (int) $shipping_method->get_meta( '_delivery_forecast' );
37
+
38
+ if ( $total ) {
39
+ /* translators: 1: shipping method name 2: days to delivery */
40
+ $names[] = sprintf( _n( '%1$s (delivery within %2$d working day after paid)', '%1$s (delivery within %2$d working days after paid)', $total, 'woocommerce-correios' ), $shipping_method->get_name(), $total );
41
+ } else {
42
+ $names[] = $shipping_method->get_name();
43
+ }
44
+ }
45
+
46
+ return implode( ', ', $names );
47
+ }
48
+
49
+ /**
50
+ * Properly display _delivery_forecast name.
51
+ *
52
+ * @param string $display_key Display key.
53
+ * @param WC_Meta_Data $meta Meta data.
54
+ * @return string
55
+ */
56
+ public function item_display_delivery_forecast( $display_key, $meta ) {
57
+ return '_delivery_forecast' === $meta->key ? __( 'Delivery forecast', 'woocommerce-correios' ) : $display_key;
58
+ }
59
+ }
60
+
61
+ new WC_Correios_Orders();
includes/class-wc-correios-rest-api.php CHANGED
@@ -88,7 +88,7 @@ class WC_Correios_REST_API {
88
  *
89
  * @return string
90
  */
91
- function get_tracking_code_callback( $data, $field, $request ) {
92
  return implode( ',', wc_correios_get_tracking_codes( $data['id'] ) );
93
  }
94
 
@@ -100,7 +100,7 @@ class WC_Correios_REST_API {
100
  *
101
  * @return bool
102
  */
103
- function update_tracking_code_callback( $value, $object ) {
104
  if ( ! $value || ! is_string( $value ) ) {
105
  return;
106
  }
88
  *
89
  * @return string
90
  */
91
+ public function get_tracking_code_callback( $data, $field, $request ) {
92
  return implode( ',', wc_correios_get_tracking_codes( $data['id'] ) );
93
  }
94
 
100
  *
101
  * @return bool
102
  */
103
+ public function update_tracking_code_callback( $value, $object ) {
104
  if ( ! $value || ! is_string( $value ) ) {
105
  return;
106
  }
includes/class-wc-correios-tracking-history.php CHANGED
@@ -45,7 +45,10 @@ class WC_Correios_Tracking_History {
45
  * @return array
46
  */
47
  protected function get_user_data() {
48
- $user_data = apply_filters( 'woocommerce_correios_tracking_user_data', array( 'login' => 'ECT', 'password' => 'SRO' ) );
 
 
 
49
 
50
  return $user_data;
51
  }
@@ -65,8 +68,7 @@ class WC_Correios_Tracking_History {
65
  /**
66
  * Access API Correios.
67
  *
68
- * @param array $tracking_code Tracking code.
69
- *
70
  * @return array
71
  */
72
  protected function get_tracking_history( $tracking_codes ) {
@@ -106,8 +108,8 @@ class WC_Correios_Tracking_History {
106
  }
107
  $objects = $_objects;
108
 
109
- // Handle single object.
110
  } elseif ( is_object( $response->return->objeto ) ) {
 
111
  $objects = array( $response->return->objeto );
112
 
113
  // Fix when return only last event.
@@ -116,13 +118,12 @@ class WC_Correios_Tracking_History {
116
  }
117
  }
118
  }
119
-
120
  } catch ( Exception $e ) {
121
  $this->logger( sprintf( 'An error occurred while trying to fetch the tracking history for "%s": %s', implode( ', ', $tracking_codes ), $e->getMessage() ) );
122
  }
123
 
124
  if ( ! is_null( $objects ) ) {
125
- $this->logger( sprintf( 'Tracking history found successfully: %s', print_r( $objects, true ) ) );
126
  }
127
 
128
  return apply_filters( 'woocommerce_correios_tracking_objects', $objects, $tracking_codes );
45
  * @return array
46
  */
47
  protected function get_user_data() {
48
+ $user_data = apply_filters( 'woocommerce_correios_tracking_user_data', array(
49
+ 'login' => 'ECT',
50
+ 'password' => 'SRO',
51
+ ) );
52
 
53
  return $user_data;
54
  }
68
  /**
69
  * Access API Correios.
70
  *
71
+ * @param array $tracking_codes Tracking codes.
 
72
  * @return array
73
  */
74
  protected function get_tracking_history( $tracking_codes ) {
108
  }
109
  $objects = $_objects;
110
 
 
111
  } elseif ( is_object( $response->return->objeto ) ) {
112
+ // Handle single object.
113
  $objects = array( $response->return->objeto );
114
 
115
  // Fix when return only last event.
118
  }
119
  }
120
  }
 
121
  } catch ( Exception $e ) {
122
  $this->logger( sprintf( 'An error occurred while trying to fetch the tracking history for "%s": %s', implode( ', ', $tracking_codes ), $e->getMessage() ) );
123
  }
124
 
125
  if ( ! is_null( $objects ) ) {
126
+ $this->logger( sprintf( 'Tracking history found successfully: %s', wc_print_r( $objects, true ) ) );
127
  }
128
 
129
  return apply_filters( 'woocommerce_correios_tracking_objects', $objects, $tracking_codes );
includes/class-wc-correios.php CHANGED
@@ -57,16 +57,18 @@ class WC_Correios {
57
  include_once dirname( __FILE__ ) . '/class-wc-correios-autofill-addresses.php';
58
  include_once dirname( __FILE__ ) . '/class-wc-correios-tracking-history.php';
59
  include_once dirname( __FILE__ ) . '/class-wc-correios-rest-api.php';
 
 
60
 
61
  // Integration.
62
  include_once dirname( __FILE__ ) . '/integrations/class-wc-correios-integration.php';
63
 
64
  // Shipping methods.
65
  if ( defined( 'WC_VERSION' ) && version_compare( WC_VERSION, '2.6.0', '>=' ) ) {
66
- include_once dirname( __FILE__ ) . '/abstracts/abstract-wc-correios-shipping.php';
67
- include_once dirname( __FILE__ ) . '/abstracts/abstract-wc-correios-shipping-carta.php';
68
- include_once dirname( __FILE__ ) . '/abstracts/abstract-wc-correios-shipping-impresso.php';
69
- include_once dirname( __FILE__ ) . '/abstracts/abstract-wc-correios-shipping-international.php';
70
  foreach ( glob( plugin_dir_path( __FILE__ ) . '/shipping/*.php' ) as $filename ) {
71
  include_once $filename;
72
  }
57
  include_once dirname( __FILE__ ) . '/class-wc-correios-autofill-addresses.php';
58
  include_once dirname( __FILE__ ) . '/class-wc-correios-tracking-history.php';
59
  include_once dirname( __FILE__ ) . '/class-wc-correios-rest-api.php';
60
+ include_once dirname( __FILE__ ) . '/class-wc-correios-orders.php';
61
+ include_once dirname( __FILE__ ) . '/class-wc-correios-cart.php';
62
 
63
  // Integration.
64
  include_once dirname( __FILE__ ) . '/integrations/class-wc-correios-integration.php';
65
 
66
  // Shipping methods.
67
  if ( defined( 'WC_VERSION' ) && version_compare( WC_VERSION, '2.6.0', '>=' ) ) {
68
+ include_once dirname( __FILE__ ) . '/abstracts/class-wc-correios-shipping.php';
69
+ include_once dirname( __FILE__ ) . '/abstracts/class-wc-correios-shipping-carta.php';
70
+ include_once dirname( __FILE__ ) . '/abstracts/class-wc-correios-shipping-impresso.php';
71
+ include_once dirname( __FILE__ ) . '/abstracts/class-wc-correios-shipping-international.php';
72
  foreach ( glob( plugin_dir_path( __FILE__ ) . '/shipping/*.php' ) as $filename ) {
73
  include_once $filename;
74
  }
includes/integrations/class-wc-correios-integration.php CHANGED
@@ -31,6 +31,8 @@ class WC_Correios_Integration extends WC_Integration {
31
 
32
  // Define user set variables.
33
  $this->tracking_enable = $this->get_option( 'tracking_enable' );
 
 
34
  $this->tracking_debug = $this->get_option( 'tracking_debug' );
35
  $this->autofill_enable = $this->get_option( 'autofill_enable' );
36
  $this->autofill_validity = $this->get_option( 'autofill_validity' );
@@ -43,6 +45,7 @@ class WC_Correios_Integration extends WC_Integration {
43
 
44
  // Tracking history actions.
45
  add_filter( 'woocommerce_correios_enable_tracking_history', array( $this, 'setup_tracking_history' ), 10 );
 
46
  add_filter( 'woocommerce_correios_enable_tracking_debug', array( $this, 'setup_tracking_debug' ), 10 );
47
 
48
  // Autofill address actions.
@@ -78,6 +81,20 @@ class WC_Correios_Integration extends WC_Integration {
78
  'label' => __( 'Enable Tracking History Table', 'woocommerce-correios' ),
79
  'default' => 'no',
80
  ),
 
 
 
 
 
 
 
 
 
 
 
 
 
 
81
  'tracking_debug' => array(
82
  'title' => __( 'Debug Log', 'woocommerce-correios' ),
83
  'type' => 'checkbox',
@@ -231,6 +248,23 @@ class WC_Correios_Integration extends WC_Integration {
231
  return 'yes' === $this->tracking_enable && class_exists( 'SoapClient' );
232
  }
233
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
234
  /**
235
  * Set up tracking debug.
236
  *
31
 
32
  // Define user set variables.
33
  $this->tracking_enable = $this->get_option( 'tracking_enable' );
34
+ $this->tracking_login = $this->get_option( 'tracking_login' );
35
+ $this->tracking_password = $this->get_option( 'tracking_password' );
36
  $this->tracking_debug = $this->get_option( 'tracking_debug' );
37
  $this->autofill_enable = $this->get_option( 'autofill_enable' );
38
  $this->autofill_validity = $this->get_option( 'autofill_validity' );
45
 
46
  // Tracking history actions.
47
  add_filter( 'woocommerce_correios_enable_tracking_history', array( $this, 'setup_tracking_history' ), 10 );
48
+ add_filter( 'woocommerce_correios_tracking_user_data', array( $this, 'setup_tracking_user_data' ), 10 );
49
  add_filter( 'woocommerce_correios_enable_tracking_debug', array( $this, 'setup_tracking_debug' ), 10 );
50
 
51
  // Autofill address actions.
81
  'label' => __( 'Enable Tracking History Table', 'woocommerce-correios' ),
82
  'default' => 'no',
83
  ),
84
+ 'tracking_login' => array(
85
+ 'title' => __( 'Administrative Code', 'woocommerce-correios' ),
86
+ 'type' => 'text',
87
+ 'description' => __( 'Your Correios login. It\'s usually your CNPJ.', 'woocommerce-correios' ),
88
+ 'desc_tip' => true,
89
+ 'default' => '',
90
+ ),
91
+ 'tracking_password' => array(
92
+ 'title' => __( 'Administrative Password', 'woocommerce-correios' ),
93
+ 'type' => 'text',
94
+ 'description' => __( 'Your Correios password.', 'woocommerce-correios' ),
95
+ 'desc_tip' => true,
96
+ 'default' => '',
97
+ ),
98
  'tracking_debug' => array(
99
  'title' => __( 'Debug Log', 'woocommerce-correios' ),
100
  'type' => 'checkbox',
248
  return 'yes' === $this->tracking_enable && class_exists( 'SoapClient' );
249
  }
250
 
251
+ /**
252
+ * Setup tracking user data.
253
+ *
254
+ * @param array $user_data User data.
255
+ * @return array
256
+ */
257
+ public function setup_tracking_user_data( $user_data ) {
258
+ if ( ! $this->tracking_login && ! $this->tracking_password ) {
259
+ $user_data = array(
260
+ 'login' => $this->tracking_login,
261
+ 'password' => $this->tracking_password,
262
+ );
263
+ }
264
+
265
+ return $user_data;
266
+ }
267
+
268
  /**
269
  * Set up tracking debug.
270
  *
includes/shipping/class-wc-correios-shipping-carta-registrada.php CHANGED
@@ -31,7 +31,7 @@ class WC_Correios_Shipping_Carta_Registrada extends WC_Correios_Shipping_Carta {
31
 
32
  /**
33
  * Get costs.
34
- * Costs based in 28/06/2016 from:
35
  * http://www.correios.com.br/para-voce/consultas-e-solicitacoes/precos-e-prazos/servicos-nacionais_pasta/carta
36
  *
37
  * @return array
@@ -39,70 +39,70 @@ class WC_Correios_Shipping_Carta_Registrada extends WC_Correios_Shipping_Carta {
39
  protected function get_costs() {
40
  return apply_filters( 'woocommerce_correios_carta_registrada_costs', array(
41
  '20' => array(
42
- 'R' => 6.00,
43
- 'AR' => 10.30,
44
- 'MP' => 11.50,
45
- 'AR+MP' => 15.80,
46
  ),
47
  '50' => array(
48
- 'R' => 6.65,
49
- 'AR' => 10.95,
50
- 'MP' => 12.15,
51
- 'AR+MP' => 16.45,
52
  ),
53
  '100' => array(
54
- 'R' => 7.55,
55
- 'AR' => 11.85,
56
- 'MP' => 13.05,
57
- 'AR+MP' => 17.35,
58
  ),
59
  '150' => array(
60
- 'R' => 8.30,
61
- 'AR' => 12.60,
62
- 'MP' => 13.80,
63
- 'AR+MP' => 18.10,
64
  ),
65
  '200' => array(
66
- 'R' => 9.00,
67
- 'AR' => 13.30,
68
- 'MP' => 14.50,
69
- 'AR+MP' => 18.80,
70
  ),
71
  '250' => array(
72
- 'R' => 9.70,
73
- 'AR' => 14.00,
74
- 'MP' => 15.20,
75
- 'AR+MP' => 19.50,
76
  ),
77
  '300' => array(
78
- 'R' => 10.50,
79
- 'AR' => 14.80,
80
- 'MP' => 16.00,
81
- 'AR+MP' => 20.30,
82
  ),
83
  '350' => array(
84
- 'R' => 11.25,
85
- 'AR' => 15.55,
86
- 'MP' => 16.75,
87
- 'AR+MP' => 21.05,
88
  ),
89
  '400' => array(
90
- 'R' => 11.95,
91
- 'AR' => 16.25,
92
- 'MP' => 17.45,
93
- 'AR+MP' => 21.75,
94
  ),
95
  '450' => array(
96
- 'R' => 12.65,
97
- 'AR' => 16.95,
98
- 'MP' => 18.15,
99
- 'AR+MP' => 22.45,
100
  ),
101
  '500' => array(
102
- 'R' => 13.40,
103
- 'AR' => 17.70,
104
- 'MP' => 18.90,
105
- 'AR+MP' => 23.20,
106
  ),
107
  ), $this->id, $this->instance_id );
108
  }
@@ -153,6 +153,8 @@ class WC_Correios_Shipping_Carta_Registrada extends WC_Correios_Shipping_Carta {
153
  return 0;
154
  }
155
 
 
 
156
  foreach ( $this->get_costs() as $cost_weight => $costs ) {
157
  if ( $weight <= $cost_weight ) {
158
  $cost = $costs[ $type ];
31
 
32
  /**
33
  * Get costs.
34
+ * Costs based in 31/10/2017 from:
35
  * http://www.correios.com.br/para-voce/consultas-e-solicitacoes/precos-e-prazos/servicos-nacionais_pasta/carta
36
  *
37
  * @return array
39
  protected function get_costs() {
40
  return apply_filters( 'woocommerce_correios_carta_registrada_costs', array(
41
  '20' => array(
42
+ 'R' => 6.85,
43
+ 'AR' => 11.85,
44
+ 'MP' => 12.75,
45
+ 'AR+MP' => 17.75,
46
  ),
47
  '50' => array(
48
+ 'R' => 7.55,
49
+ 'AR' => 12.55,
50
+ 'MP' => 13.45,
51
+ 'AR+MP' => 18.45,
52
  ),
53
  '100' => array(
54
+ 'R' => 8.55,
55
+ 'AR' => 13.55,
56
+ 'MP' => 14.45,
57
+ 'AR+MP' => 19.45,
58
  ),
59
  '150' => array(
60
+ 'R' => 9.35,
61
+ 'AR' => 14.35,
62
+ 'MP' => 15.25,
63
+ 'AR+MP' => 20.25,
64
  ),
65
  '200' => array(
66
+ 'R' => 10.10,
67
+ 'AR' => 15.10,
68
+ 'MP' => 16.00,
69
+ 'AR+MP' => 21.00,
70
  ),
71
  '250' => array(
72
+ 'R' => 10.90,
73
+ 'AR' => 15.90,
74
+ 'MP' => 16.80,
75
+ 'AR+MP' => 21.80,
76
  ),
77
  '300' => array(
78
+ 'R' => 11.75,
79
+ 'AR' => 16.75,
80
+ 'MP' => 17.65,
81
+ 'AR+MP' => 22.65,
82
  ),
83
  '350' => array(
84
+ 'R' => 12.55,
85
+ 'AR' => 17.55,
86
+ 'MP' => 18.45,
87
+ 'AR+MP' => 23.45,
88
  ),
89
  '400' => array(
90
+ 'R' => 13.30,
91
+ 'AR' => 18.30,
92
+ 'MP' => 19.20,
93
+ 'AR+MP' => 24.20,
94
  ),
95
  '450' => array(
96
+ 'R' => 14.10,
97
+ 'AR' => 19.10,
98
+ 'MP' => 20.00,
99
+ 'AR+MP' => 25.00,
100
  ),
101
  '500' => array(
102
+ 'R' => 14.90,
103
+ 'AR' => 19.90,
104
+ 'MP' => 20.80,
105
+ 'AR+MP' => 25.80,
106
  ),
107
  ), $this->id, $this->instance_id );
108
  }
153
  return 0;
154
  }
155
 
156
+ $weight += wc_format_decimal($this->extra_weight);
157
+
158
  foreach ( $this->get_costs() as $cost_weight => $costs ) {
159
  if ( $weight <= $cost_weight ) {
160
  $cost = $costs[ $type ];
includes/shipping/class-wc-correios-shipping-esedex.php DELETED
@@ -1,51 +0,0 @@
1
- <?php
2
- /**
3
- * Correios e-SEDEX shipping method.
4
- *
5
- * @package WooCommerce_Correios/Classes/Shipping
6
- * @since 3.0.0
7
- * @version 3.0.0
8
- */
9
-
10
- if ( ! defined( 'ABSPATH' ) ) {
11
- exit;
12
- }
13
-
14
- /**
15
- * E-SEDEX shipping method class.
16
- */
17
- class WC_Correios_Shipping_ESEDEX extends WC_Correios_Shipping {
18
-
19
- /**
20
- * Service code.
21
- * 81019 - e-SEDEX.
22
- *
23
- * @var string
24
- */
25
- protected $code = '81019';
26
-
27
- /**
28
- * Initialize e-SEDEX.
29
- *
30
- * @param int $instance_id Shipping zone instance.
31
- */
32
- public function __construct( $instance_id = 0 ) {
33
- $this->id = 'correios-esedex';
34
- $this->method_title = __( 'e-SEDEX', 'woocommerce-correios' );
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/shipping/class-wc-correios-shipping-impresso-normal.php CHANGED
@@ -19,17 +19,17 @@ class WC_Correios_Shipping_Impresso_Normal extends WC_Correios_Shipping_Impresso
19
  /**
20
  * Additional cost per kg or fraction.
21
  *
22
- * Cost based in 01/02/2017 from:
23
  * https://www.correios.com.br/para-voce/consultas-e-solicitacoes/precos-e-prazos/servicos-nacionais_pasta/impresso-normal
24
  *
25
  * @var float
26
  */
27
- protected $additional_cost_per_kg = 4.05;
28
 
29
  /**
30
  * Weight limit for this shipping method.
31
  *
32
- * Value based in 01/02/2017 from:
33
  * https://www.correios.com.br/para-voce/consultas-e-solicitacoes/precos-e-prazos/servicos-nacionais_pasta/impresso-normal
34
  *
35
  * @var float
@@ -49,6 +49,19 @@ class WC_Correios_Shipping_Impresso_Normal extends WC_Correios_Shipping_Impresso
49
  parent::__construct( $instance_id );
50
  }
51
 
 
 
 
 
 
 
 
 
 
 
 
 
 
52
  /**
53
  * Get costs.
54
  * Costs based in 01/02/2017 from:
@@ -58,27 +71,27 @@ class WC_Correios_Shipping_Impresso_Normal extends WC_Correios_Shipping_Impresso
58
  */
59
  protected function get_costs() {
60
  return apply_filters( 'woocommerce_correios_impresso_normal_costs', array(
61
- '20' => 1.05,
62
- '50' => 1.60,
63
- '100' => 2.10,
64
- '150' => 2.55,
65
- '200' => 3.00,
66
  '250' => 3.50,
67
- '300' => 3.95,
68
- '350' => 4.40,
69
- '400' => 4.90,
70
- '450' => 5.40,
71
- '500' => 5.90,
72
- '550' => 6.25,
73
- '600' => 6.70,
74
- '650' => 7.15,
75
- '700' => 7.50,
76
- '750' => 7.90,
77
- '800' => 8.30,
78
- '850' => 8.75,
79
- '900' => 9.25,
80
- '950' => 9.65,
81
- '1000' => 10.05,
82
  ), $this->id, $this->instance_id );
83
  }
84
 
@@ -106,12 +119,14 @@ class WC_Correios_Shipping_Impresso_Normal extends WC_Correios_Shipping_Impresso
106
  return 0;
107
  }
108
 
109
- // Get the package weight and validate.
110
  $weight = $this->get_package_weight( $package );
111
  if ( false === $weight ) {
112
  return 0;
113
  }
114
 
 
 
115
  if ( $weight <= $this->shipping_method_weight_limit ) {
116
  if ( $weight > 2000 ) {
117
  return 0;
@@ -126,12 +141,14 @@ class WC_Correios_Shipping_Impresso_Normal extends WC_Correios_Shipping_Impresso
126
  $additional_weight_gs = $weight;
127
  }
128
 
 
 
129
  foreach ( $this->get_costs() as $cost_weights => $costs ) {
130
  if ( $additional_weight_gs <= $cost_weights ) {
131
  $cost = $costs;
132
 
133
  if ( $additional_weight_kgs > 0 ) {
134
- $cost += $additional_weight_kgs * $this->additional_cost_per_kg;
135
  }
136
 
137
  if ( $weight > $this->reasonable_registry_weight_limit || 'yes' === $this->own_hands || 'RN' === $this->registry_type ) {
19
  /**
20
  * Additional cost per kg or fraction.
21
  *
22
+ * Cost based in 01/02/2018 from:
23
  * https://www.correios.com.br/para-voce/consultas-e-solicitacoes/precos-e-prazos/servicos-nacionais_pasta/impresso-normal
24
  *
25
  * @var float
26
  */
27
+ protected $additional_cost_per_kg = 4.15;
28
 
29
  /**
30
  * Weight limit for this shipping method.
31
  *
32
+ * Value based in 01/02/2018 from:
33
  * https://www.correios.com.br/para-voce/consultas-e-solicitacoes/precos-e-prazos/servicos-nacionais_pasta/impresso-normal
34
  *
35
  * @var float
49
  parent::__construct( $instance_id );
50
  }
51
 
52
+ /**
53
+ * Get additional costs per kg or fraction.
54
+ *
55
+ * Cost based in 01/02/2018 from:
56
+ * https://www.correios.com.br/para-voce/consultas-e-solicitacoes/precos-e-prazos/servicos-nacionais_pasta/impresso-normal
57
+ *
58
+ * @return float
59
+ */
60
+ protected function get_additional_costs_per_kg() {
61
+ return apply_filters( 'woocommerce_correios_impresso_additional_cost_per_kg',
62
+ $this->additional_cost_per_kg, $this->id, $this->instance_id );
63
+ }
64
+
65
  /**
66
  * Get costs.
67
  * Costs based in 01/02/2017 from:
71
  */
72
  protected function get_costs() {
73
  return apply_filters( 'woocommerce_correios_impresso_normal_costs', array(
74
+ '20' => 1.10,
75
+ '50' => 1.65,
76
+ '100' => 2.15,
77
+ '150' => 2.60,
78
+ '200' => 3.10,
79
  '250' => 3.50,
80
+ '300' => 4.05,
81
+ '350' => 4.50,
82
+ '400' => 5.05,
83
+ '450' => 5.55,
84
+ '500' => 6.05,
85
+ '550' => 6.40,
86
+ '600' => 6.90,
87
+ '650' => 7.35,
88
+ '700' => 7.70,
89
+ '750' => 8.10,
90
+ '800' => 8.50,
91
+ '850' => 9.00,
92
+ '900' => 9.50,
93
+ '950' => 9.90,
94
+ '1000' => 10.30,
95
  ), $this->id, $this->instance_id );
96
  }
97
 
119
  return 0;
120
  }
121
 
122
+ // Get the package weight, validate and add extra weight.
123
  $weight = $this->get_package_weight( $package );
124
  if ( false === $weight ) {
125
  return 0;
126
  }
127
 
128
+ $weight += wc_format_decimal( $this->extra_weight );
129
+
130
  if ( $weight <= $this->shipping_method_weight_limit ) {
131
  if ( $weight > 2000 ) {
132
  return 0;
141
  $additional_weight_gs = $weight;
142
  }
143
 
144
+ $additional_costs_per_kg = $this->get_additional_costs_per_kg();
145
+
146
  foreach ( $this->get_costs() as $cost_weights => $costs ) {
147
  if ( $additional_weight_gs <= $cost_weights ) {
148
  $cost = $costs;
149
 
150
  if ( $additional_weight_kgs > 0 ) {
151
+ $cost += $additional_weight_kgs * $additional_costs_per_kg;
152
  }
153
 
154
  if ( $weight > $this->reasonable_registry_weight_limit || 'yes' === $this->own_hands || 'RN' === $this->registry_type ) {
includes/shipping/class-wc-correios-shipping-impresso-urgente.php CHANGED
@@ -19,7 +19,7 @@ class WC_Correios_Shipping_Impresso_Urgente extends WC_Correios_Shipping_Impress
19
  /**
20
  * Weight limit for this shipping method.
21
  *
22
- * Value based in 01/02/2017 from:
23
  * https://www.correios.com.br/para-voce/consultas-e-solicitacoes/precos-e-prazos/servicos-nacionais_pasta/impresso-normal
24
  *
25
  * @var float
@@ -41,24 +41,24 @@ class WC_Correios_Shipping_Impresso_Urgente extends WC_Correios_Shipping_Impress
41
 
42
  /**
43
  * Get costs.
44
- * Costs based in 01/02/2017 from:
45
  * https://www.correios.com.br/para-voce/consultas-e-solicitacoes/precos-e-prazos/servicos-nacionais_pasta/impresso-normal
46
  *
47
  * @return array
48
  */
49
  protected function get_costs() {
50
  return apply_filters( 'woocommerce_correios_impresso_urgente_costs', array(
51
- '20' => 1.50,
52
- '50' => 2.10,
53
- '100' => 2.85,
54
- '150' => 3.50,
55
- '200' => 4.10,
56
- '250' => 4.80,
57
- '300' => 5.40,
58
- '350' => 6.05,
59
- '400' => 6.60,
60
- '450' => 7.30,
61
- '500' => 7.90,
62
  ), $this->id, $this->instance_id );
63
  }
64
 
@@ -84,12 +84,14 @@ class WC_Correios_Shipping_Impresso_Urgente extends WC_Correios_Shipping_Impress
84
  return 0;
85
  }
86
 
87
- // Get the package weight and validate.
88
  $weight = $this->get_package_weight( $package );
89
  if ( false === $weight ) {
90
  return 0;
91
  }
92
 
 
 
93
  if ( $weight <= $this->shipping_method_weight_limit ) {
94
  foreach ( $this->get_costs() as $cost_weights => $costs ) {
95
  if ( $weight <= $cost_weights ) {
19
  /**
20
  * Weight limit for this shipping method.
21
  *
22
+ * Value based in 01/02/2018 from:
23
  * https://www.correios.com.br/para-voce/consultas-e-solicitacoes/precos-e-prazos/servicos-nacionais_pasta/impresso-normal
24
  *
25
  * @var float
41
 
42
  /**
43
  * Get costs.
44
+ * Costs based in 01/02/2018 from:
45
  * https://www.correios.com.br/para-voce/consultas-e-solicitacoes/precos-e-prazos/servicos-nacionais_pasta/impresso-normal
46
  *
47
  * @return array
48
  */
49
  protected function get_costs() {
50
  return apply_filters( 'woocommerce_correios_impresso_urgente_costs', array(
51
+ '20' => 1.55,
52
+ '50' => 2.15,
53
+ '100' => 2.95,
54
+ '150' => 3.60,
55
+ '200' => 4.20,
56
+ '250' => 4.95,
57
+ '300' => 5.55,
58
+ '350' => 6.20,
59
+ '400' => 6.80,
60
+ '450' => 7.50,
61
+ '500' => 8.10,
62
  ), $this->id, $this->instance_id );
63
  }
64
 
84
  return 0;
85
  }
86
 
87
+ // Get the package weight, validate and add extra weight.
88
  $weight = $this->get_package_weight( $package );
89
  if ( false === $weight ) {
90
  return 0;
91
  }
92
 
93
+ $weight += wc_format_decimal($this->extra_weight);
94
+
95
  if ( $weight <= $this->shipping_method_weight_limit ) {
96
  foreach ( $this->get_costs() as $cost_weights => $costs ) {
97
  if ( $weight <= $cost_weights ) {
includes/wc-correios-functions.php CHANGED
@@ -4,7 +4,7 @@
4
  *
5
  * @package WooCommerce_Correios/Functions
6
  * @since 3.0.0
7
- * @version 3.2.2
8
  */
9
 
10
  if ( ! defined( 'ABSPATH' ) ) {
@@ -41,8 +41,6 @@ function wc_correios_safe_load_xml( $source, $options = 0 ) {
41
 
42
  if ( isset( $dom->doctype ) ) {
43
  throw new Exception( 'Unsafe DOCTYPE Detected while XML parsing' );
44
-
45
- return false;
46
  }
47
 
48
  return simplexml_import_dom( $dom );
@@ -72,7 +70,8 @@ function wc_correios_get_estimating_delivery( $name, $days, $additional_days = 0
72
  $total = intval( $days ) + intval( $additional_days );
73
 
74
  if ( $total > 0 ) {
75
- $name .= ' (' . sprintf( _n( 'Delivery within %d working day', 'Delivery within %d working days', $total, 'woocommerce-correios' ), $total ) . ')';
 
76
  }
77
 
78
  return apply_filters( 'woocommerce_correios_get_estimating_delivery', $name, $days, $additional_days );
@@ -157,7 +156,7 @@ function wc_correios_get_tracking_codes( $order ) {
157
  *
158
  * @param WC_Order|int $order Order ID or order data.
159
  * @param string $tracking_code Tracking code.
160
- * @param bool remove If should remove the tracking code.
161
  *
162
  * @return bool
163
  */
@@ -197,6 +196,7 @@ function wc_correios_update_tracking_code( $order, $tracking_code, $remove = fal
197
  }
198
 
199
  // Add order note.
 
200
  $order->add_order_note( sprintf( __( 'Added a Correios tracking code: %s', 'woocommerce-correios' ), $tracking_code ) );
201
 
202
  // Send email notification.
@@ -204,7 +204,9 @@ function wc_correios_update_tracking_code( $order, $tracking_code, $remove = fal
204
 
205
  return true;
206
  } elseif ( $remove && in_array( $tracking_code, $tracking_codes, true ) ) {
207
- if ( false !== ( $key = array_search( $tracking_code, $tracking_codes ) ) ) {
 
 
208
  unset( $tracking_codes[ $key ] );
209
  }
210
 
@@ -216,6 +218,7 @@ function wc_correios_update_tracking_code( $order, $tracking_code, $remove = fal
216
  }
217
 
218
  // Add order note.
 
219
  $order->add_order_note( sprintf( __( 'Removed a Correios tracking code: %s', 'woocommerce-correios' ), $tracking_code ) );
220
 
221
  return true;
4
  *
5
  * @package WooCommerce_Correios/Functions
6
  * @since 3.0.0
7
+ * @version 3.7.0
8
  */
9
 
10
  if ( ! defined( 'ABSPATH' ) ) {
41
 
42
  if ( isset( $dom->doctype ) ) {
43
  throw new Exception( 'Unsafe DOCTYPE Detected while XML parsing' );
 
 
44
  }
45
 
46
  return simplexml_import_dom( $dom );
70
  $total = intval( $days ) + intval( $additional_days );
71
 
72
  if ( $total > 0 ) {
73
+ /* translators: %d: days to delivery */
74
+ $name .= ' (' . sprintf( _n( 'Delivery within %d working day', 'Delivery within %d working days', $total, 'woocommerce-correios' ), $total ) . ')';
75
  }
76
 
77
  return apply_filters( 'woocommerce_correios_get_estimating_delivery', $name, $days, $additional_days );
156
  *
157
  * @param WC_Order|int $order Order ID or order data.
158
  * @param string $tracking_code Tracking code.
159
+ * @param bool $remove If should remove the tracking code.
160
  *
161
  * @return bool
162
  */
196
  }
197
 
198
  // Add order note.
199
+ /* translators: %s: tracking code */
200
  $order->add_order_note( sprintf( __( 'Added a Correios tracking code: %s', 'woocommerce-correios' ), $tracking_code ) );
201
 
202
  // Send email notification.
204
 
205
  return true;
206
  } elseif ( $remove && in_array( $tracking_code, $tracking_codes, true ) ) {
207
+ $key = array_search( $tracking_code, $tracking_codes, true );
208
+
209
+ if ( false !== $key ) {
210
  unset( $tracking_codes[ $key ] );
211
  }
212
 
218
  }
219
 
220
  // Add order note.
221
+ /* translators: %s: tracking code */
222
  $order->add_order_note( sprintf( __( 'Removed a Correios tracking code: %s', 'woocommerce-correios' ), $tracking_code ) );
223
 
224
  return true;
languages/woocommerce-correios.pot CHANGED
@@ -1,405 +1,420 @@
1
- # Copyright (C) 2017 Claudio Sanches
2
  # This file is distributed under the GPLv2 or later.
3
  msgid ""
4
  msgstr ""
5
- "Project-Id-Version: WooCommerce Correios 3.6.0\n"
6
  "Report-Msgid-Bugs-To: "
7
  "https://wordpress.org/support/plugin/woocommerce-correios\n"
8
- "POT-Creation-Date: 2017-11-20 00:05:06+00:00\n"
9
  "MIME-Version: 1.0\n"
10
  "Content-Type: text/plain; charset=utf-8\n"
11
  "Content-Transfer-Encoding: 8bit\n"
12
- "PO-Revision-Date: 2017-MO-DA HO:MI+ZONE\n"
13
  "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
14
  "Language-Team: LANGUAGE <LL@li.org>\n"
15
  "X-Generator: grunt-wp-i18n 0.5.4\n"
16
 
17
- #: includes/abstracts/abstract-wc-correios-shipping-carta.php:26
18
- #: includes/abstracts/abstract-wc-correios-shipping-impresso.php:78
19
- #: includes/abstracts/abstract-wc-correios-shipping.php:42
 
20
  msgid "%s is a shipping method from Correios."
21
  msgstr ""
22
 
23
- #: includes/abstracts/abstract-wc-correios-shipping-carta.php:63
24
  msgid "-- Select a shipping class --"
25
  msgstr ""
26
 
27
- #: includes/abstracts/abstract-wc-correios-shipping-carta.php:79
28
- #: includes/abstracts/abstract-wc-correios-shipping-impresso.php:114
29
- #: includes/abstracts/abstract-wc-correios-shipping-international.php:57
30
- #: includes/abstracts/abstract-wc-correios-shipping.php:125
31
  #: includes/emails/class-wc-correios-tracking-email.php:50
32
- #: includes/integrations/class-wc-correios-integration.php:76
33
- #: includes/integrations/class-wc-correios-integration.php:95
34
  #: includes/shipping/class-wc-correios-shipping-legacy.php:79
35
  msgid "Enable/Disable"
36
  msgstr ""
37
 
38
- #: includes/abstracts/abstract-wc-correios-shipping-carta.php:81
39
- #: includes/abstracts/abstract-wc-correios-shipping-impresso.php:116
40
- #: includes/abstracts/abstract-wc-correios-shipping-international.php:59
41
- #: includes/abstracts/abstract-wc-correios-shipping.php:127
42
  #: includes/shipping/class-wc-correios-shipping-legacy.php:81
43
  msgid "Enable this shipping method"
44
  msgstr ""
45
 
46
- #: includes/abstracts/abstract-wc-correios-shipping-carta.php:85
47
- #: includes/abstracts/abstract-wc-correios-shipping-impresso.php:120
48
- #: includes/abstracts/abstract-wc-correios-shipping-international.php:63
49
- #: includes/abstracts/abstract-wc-correios-shipping.php:131
50
  #: includes/shipping/class-wc-correios-shipping-legacy.php:85
51
  msgid "Title"
52
  msgstr ""
53
 
54
- #: includes/abstracts/abstract-wc-correios-shipping-carta.php:87
55
- #: includes/abstracts/abstract-wc-correios-shipping-impresso.php:122
56
- #: includes/abstracts/abstract-wc-correios-shipping-international.php:65
57
- #: includes/abstracts/abstract-wc-correios-shipping.php:133
58
  #: includes/shipping/class-wc-correios-shipping-legacy.php:87
59
  msgid "This controls the title which the user sees during checkout."
60
  msgstr ""
61
 
62
- #: includes/abstracts/abstract-wc-correios-shipping-carta.php:92
63
- #: includes/abstracts/abstract-wc-correios-shipping-impresso.php:127
64
- #: includes/abstracts/abstract-wc-correios-shipping-international.php:70
65
- #: includes/abstracts/abstract-wc-correios-shipping.php:138
66
  msgid "Behavior Options"
67
  msgstr ""
68
 
69
- #: includes/abstracts/abstract-wc-correios-shipping-carta.php:97
70
- #: includes/abstracts/abstract-wc-correios-shipping-impresso.php:132
71
- #: includes/abstracts/abstract-wc-correios-shipping-international.php:96
72
- #: includes/abstracts/abstract-wc-correios-shipping.php:151
73
  msgid "Shipping Class"
74
  msgstr ""
75
 
76
- #: includes/abstracts/abstract-wc-correios-shipping-carta.php:99
77
- #: includes/abstracts/abstract-wc-correios-shipping-impresso.php:134
78
  msgid "Select for which shipping class this method will be applied."
79
  msgstr ""
80
 
81
- #: includes/abstracts/abstract-wc-correios-shipping-carta.php:106
82
- #: includes/abstracts/abstract-wc-correios-shipping-impresso.php:155
83
- #: includes/abstracts/abstract-wc-correios-shipping-international.php:105
84
- #: includes/abstracts/abstract-wc-correios-shipping.php:160
85
  msgid "Delivery Time"
86
  msgstr ""
87
 
88
- #: includes/abstracts/abstract-wc-correios-shipping-carta.php:108
89
- #: includes/abstracts/abstract-wc-correios-shipping-impresso.php:157
90
- #: includes/abstracts/abstract-wc-correios-shipping-international.php:107
91
- #: includes/abstracts/abstract-wc-correios-shipping.php:162
92
  msgid "Show estimated delivery time"
93
  msgstr ""
94
 
95
- #: includes/abstracts/abstract-wc-correios-shipping-carta.php:109
96
- #: includes/abstracts/abstract-wc-correios-shipping-impresso.php:158
97
- #: includes/abstracts/abstract-wc-correios-shipping-international.php:108
98
- #: includes/abstracts/abstract-wc-correios-shipping.php:163
99
  msgid "Display the estimated delivery time in working days."
100
  msgstr ""
101
 
102
- #: includes/abstracts/abstract-wc-correios-shipping-carta.php:114
103
- #: includes/abstracts/abstract-wc-correios-shipping-impresso.php:163
104
  msgid "Delivery Days"
105
  msgstr ""
106
 
107
- #: includes/abstracts/abstract-wc-correios-shipping-carta.php:116
108
- #: includes/abstracts/abstract-wc-correios-shipping-impresso.php:165
109
  msgid "Working days to the estimated delivery."
110
  msgstr ""
111
 
112
- #: includes/abstracts/abstract-wc-correios-shipping-carta.php:122
113
- #: includes/abstracts/abstract-wc-correios-shipping-impresso.php:171
114
- #: includes/abstracts/abstract-wc-correios-shipping-international.php:113
115
- #: includes/abstracts/abstract-wc-correios-shipping.php:176
 
 
 
 
 
 
 
 
 
 
 
 
116
  #: includes/shipping/class-wc-correios-shipping-legacy.php:123
117
  msgid "Handling Fee"
118
  msgstr ""
119
 
120
- #: includes/abstracts/abstract-wc-correios-shipping-carta.php:124
121
- #: includes/abstracts/abstract-wc-correios-shipping-impresso.php:173
122
- #: includes/abstracts/abstract-wc-correios-shipping-international.php:115
123
- #: includes/abstracts/abstract-wc-correios-shipping.php:178
124
  #: includes/shipping/class-wc-correios-shipping-legacy.php:125
125
  msgid ""
126
  "Enter an amount, e.g. 2.50, or a percentage, e.g. 5%. Leave blank to "
127
  "disable."
128
  msgstr ""
129
 
130
- #: includes/abstracts/abstract-wc-correios-shipping-carta.php:130
131
- #: includes/abstracts/abstract-wc-correios-shipping-impresso.php:179
132
- #: includes/abstracts/abstract-wc-correios-shipping-international.php:121
133
- #: includes/abstracts/abstract-wc-correios-shipping.php:184
134
  msgid "Optional Services"
135
  msgstr ""
136
 
137
- #: includes/abstracts/abstract-wc-correios-shipping-carta.php:132
138
- #: includes/abstracts/abstract-wc-correios-shipping-impresso.php:181
139
- #: includes/abstracts/abstract-wc-correios-shipping-international.php:123
140
- #: includes/abstracts/abstract-wc-correios-shipping.php:186
141
  msgid "Use these options to add the value of each service provided by the Correios."
142
  msgstr ""
143
 
144
- #: includes/abstracts/abstract-wc-correios-shipping-carta.php:136
145
- #: includes/abstracts/abstract-wc-correios-shipping-impresso.php:185
146
- #: includes/abstracts/abstract-wc-correios-shipping.php:190
147
  msgid "Receipt Notice"
148
  msgstr ""
149
 
150
- #: includes/abstracts/abstract-wc-correios-shipping-carta.php:138
151
- #: includes/abstracts/abstract-wc-correios-shipping-impresso.php:187
152
- #: includes/abstracts/abstract-wc-correios-shipping.php:192
153
  msgid "Enable receipt notice"
154
  msgstr ""
155
 
156
- #: includes/abstracts/abstract-wc-correios-shipping-carta.php:139
157
- #: includes/abstracts/abstract-wc-correios-shipping-impresso.php:188
158
- #: includes/abstracts/abstract-wc-correios-shipping.php:193
159
  msgid "This controls whether to add costs of the receipt notice service."
160
  msgstr ""
161
 
162
- #: includes/abstracts/abstract-wc-correios-shipping-carta.php:144
163
- #: includes/abstracts/abstract-wc-correios-shipping-impresso.php:193
164
- #: includes/abstracts/abstract-wc-correios-shipping.php:198
165
  msgid "Own Hands"
166
  msgstr ""
167
 
168
- #: includes/abstracts/abstract-wc-correios-shipping-carta.php:146
169
- #: includes/abstracts/abstract-wc-correios-shipping-impresso.php:195
170
- #: includes/abstracts/abstract-wc-correios-shipping.php:200
171
  msgid "Enable own hands"
172
  msgstr ""
173
 
174
- #: includes/abstracts/abstract-wc-correios-shipping-carta.php:147
175
- #: includes/abstracts/abstract-wc-correios-shipping-impresso.php:196
176
- #: includes/abstracts/abstract-wc-correios-shipping.php:201
177
  msgid "This controls whether to add costs of the own hands service"
178
  msgstr ""
179
 
180
- #: includes/abstracts/abstract-wc-correios-shipping-carta.php:152
181
- #: includes/abstracts/abstract-wc-correios-shipping-impresso.php:201
182
- #: includes/abstracts/abstract-wc-correios-shipping-international.php:127
183
- #: includes/abstracts/abstract-wc-correios-shipping.php:287
184
  #: includes/shipping/class-wc-correios-shipping-legacy.php:224
185
  msgid "Testing"
186
  msgstr ""
187
 
188
- #: includes/abstracts/abstract-wc-correios-shipping-carta.php:157
189
- #: includes/abstracts/abstract-wc-correios-shipping-impresso.php:206
190
- #: includes/abstracts/abstract-wc-correios-shipping-international.php:132
191
- #: includes/abstracts/abstract-wc-correios-shipping.php:292
192
- #: includes/integrations/class-wc-correios-integration.php:82
193
- #: includes/integrations/class-wc-correios-integration.php:147
194
  #: includes/shipping/class-wc-correios-shipping-legacy.php:228
195
  msgid "Debug Log"
196
  msgstr ""
197
 
198
- #: includes/abstracts/abstract-wc-correios-shipping-carta.php:159
199
- #: includes/abstracts/abstract-wc-correios-shipping-impresso.php:208
200
- #: includes/abstracts/abstract-wc-correios-shipping-international.php:134
201
- #: includes/abstracts/abstract-wc-correios-shipping.php:294
202
  #: includes/shipping/class-wc-correios-shipping-legacy.php:230
203
  msgid "Enable logging"
204
  msgstr ""
205
 
206
- #: includes/abstracts/abstract-wc-correios-shipping-carta.php:161
207
- #: includes/abstracts/abstract-wc-correios-shipping-impresso.php:210
208
- #: includes/abstracts/abstract-wc-correios-shipping-international.php:136
209
- #: includes/abstracts/abstract-wc-correios-shipping.php:296
210
- #: includes/integrations/class-wc-correios-integration.php:87
211
- #: includes/integrations/class-wc-correios-integration.php:152
 
212
  #. translators: %s: log link
213
  msgid "Log %s events, such as WebServices requests."
214
  msgstr ""
215
 
216
- #: includes/abstracts/abstract-wc-correios-shipping-impresso.php:141
217
  msgid "Registry Type"
218
  msgstr ""
219
 
220
- #: includes/abstracts/abstract-wc-correios-shipping-impresso.php:143
221
  msgid "Select for which registry type this method will be applied."
222
  msgstr ""
223
 
224
- #: includes/abstracts/abstract-wc-correios-shipping-impresso.php:148
225
  msgid "-- Select a registry type --"
226
  msgstr ""
227
 
228
- #: includes/abstracts/abstract-wc-correios-shipping-impresso.php:149
229
  msgid "Registro Nacional"
230
  msgstr ""
231
 
232
- #: includes/abstracts/abstract-wc-correios-shipping-impresso.php:150
233
  msgid "Registro Módico"
234
  msgstr ""
235
 
236
- #: includes/abstracts/abstract-wc-correios-shipping-international.php:28
237
  msgid "%s is a international shipping method from Correios."
238
  msgstr ""
239
 
240
- #: includes/abstracts/abstract-wc-correios-shipping-international.php:75
241
  msgid "Origin State"
242
  msgstr ""
243
 
244
- #: includes/abstracts/abstract-wc-correios-shipping-international.php:77
245
  msgid "The UF of the location your packages are delivered from."
246
  msgstr ""
247
 
248
- #: includes/abstracts/abstract-wc-correios-shipping-international.php:84
249
  msgid "Origin Locale"
250
  msgstr ""
251
 
252
- #: includes/abstracts/abstract-wc-correios-shipping-international.php:86
253
  msgid "The location of your packages are delivered from."
254
  msgstr ""
255
 
256
- #: includes/abstracts/abstract-wc-correios-shipping-international.php:91
257
  msgid "Capital"
258
  msgstr ""
259
 
260
- #: includes/abstracts/abstract-wc-correios-shipping-international.php:92
261
  msgid "Interior"
262
  msgstr ""
263
 
264
- #: includes/abstracts/abstract-wc-correios-shipping-international.php:98
265
- #: includes/abstracts/abstract-wc-correios-shipping.php:153
266
  msgid "If necessary, select a shipping class to apply this method."
267
  msgstr ""
268
 
269
- #: includes/abstracts/abstract-wc-correios-shipping.php:82
270
- #: includes/integrations/class-wc-correios-integration.php:62
271
  msgid "View logs."
272
  msgstr ""
273
 
274
- #: includes/abstracts/abstract-wc-correios-shipping.php:108
275
  msgid "Any Shipping Class"
276
  msgstr ""
277
 
278
- #: includes/abstracts/abstract-wc-correios-shipping.php:109
279
  msgid "No Shipping Class"
280
  msgstr ""
281
 
282
- #: includes/abstracts/abstract-wc-correios-shipping.php:143
283
  msgid "Origin Postcode"
284
  msgstr ""
285
 
286
- #: includes/abstracts/abstract-wc-correios-shipping.php:145
287
  msgid "The postcode of the location your packages are delivered from."
288
  msgstr ""
289
 
290
- #: includes/abstracts/abstract-wc-correios-shipping.php:168
291
  msgid "Additional Days"
292
  msgstr ""
293
 
294
- #: includes/abstracts/abstract-wc-correios-shipping.php:170
295
  msgid "Additional working days to the estimated delivery."
296
  msgstr ""
297
 
298
- #: includes/abstracts/abstract-wc-correios-shipping.php:206
299
  msgid "Declare Value for Insurance"
300
  msgstr ""
301
 
302
- #: includes/abstracts/abstract-wc-correios-shipping.php:208
303
  msgid "Enable declared value"
304
  msgstr ""
305
 
306
- #: includes/abstracts/abstract-wc-correios-shipping.php:209
307
  msgid ""
308
  "This controls if the price of the package must be declared for insurance "
309
  "purposes."
310
  msgstr ""
311
 
312
- #: includes/abstracts/abstract-wc-correios-shipping.php:214
313
  msgid "Service Options"
314
  msgstr ""
315
 
316
- #: includes/abstracts/abstract-wc-correios-shipping.php:219
317
  msgid "Service Code"
318
  msgstr ""
319
 
320
- #: includes/abstracts/abstract-wc-correios-shipping.php:221
321
  msgid "Service code, use this for custom codes."
322
  msgstr ""
323
 
324
- #: includes/abstracts/abstract-wc-correios-shipping.php:227
325
- #: includes/shipping/class-wc-correios-shipping-esedex.php:40
326
  msgid "Service Type"
327
  msgstr ""
328
 
329
- #: includes/abstracts/abstract-wc-correios-shipping.php:229
330
- #: includes/shipping/class-wc-correios-shipping-esedex.php:42
331
  #: includes/shipping/class-wc-correios-shipping-legacy.php:136
332
  msgid "Choose between conventional or corporate service."
333
  msgstr ""
334
 
335
- #: includes/abstracts/abstract-wc-correios-shipping.php:234
336
  #: includes/shipping/class-wc-correios-shipping-legacy.php:140
337
  msgid "Conventional"
338
  msgstr ""
339
 
340
- #: includes/abstracts/abstract-wc-correios-shipping.php:235
341
- #: includes/shipping/class-wc-correios-shipping-esedex.php:47
342
  #: includes/shipping/class-wc-correios-shipping-legacy.php:141
343
  msgid "Corporate"
344
  msgstr ""
345
 
346
- #: includes/abstracts/abstract-wc-correios-shipping.php:239
 
347
  #: includes/shipping/class-wc-correios-shipping-legacy.php:145
348
  msgid "Administrative Code"
349
  msgstr ""
350
 
351
- #: includes/abstracts/abstract-wc-correios-shipping.php:241
 
352
  msgid "Your Correios login. It's usually your CNPJ."
353
  msgstr ""
354
 
355
- #: includes/abstracts/abstract-wc-correios-shipping.php:246
 
356
  #: includes/shipping/class-wc-correios-shipping-legacy.php:151
357
  msgid "Administrative Password"
358
  msgstr ""
359
 
360
- #: includes/abstracts/abstract-wc-correios-shipping.php:248
 
361
  #: includes/shipping/class-wc-correios-shipping-legacy.php:153
362
  msgid "Your Correios password."
363
  msgstr ""
364
 
365
- #: includes/abstracts/abstract-wc-correios-shipping.php:253
366
  #: includes/shipping/class-wc-correios-shipping-legacy.php:197
367
  msgid "Package Standard"
368
  msgstr ""
369
 
370
- #: includes/abstracts/abstract-wc-correios-shipping.php:255
371
  msgid "Minimum measure for your shipping packages."
372
  msgstr ""
373
 
374
- #: includes/abstracts/abstract-wc-correios-shipping.php:259
375
  msgid "Minimum Height (cm)"
376
  msgstr ""
377
 
378
- #: includes/abstracts/abstract-wc-correios-shipping.php:261
379
  msgid "Minimum height of your shipping packages. Correios needs at least 2cm."
380
  msgstr ""
381
 
382
- #: includes/abstracts/abstract-wc-correios-shipping.php:266
383
  msgid "Minimum Width (cm)"
384
  msgstr ""
385
 
386
- #: includes/abstracts/abstract-wc-correios-shipping.php:268
387
  msgid "Minimum width of your shipping packages. Correios needs at least 11cm."
388
  msgstr ""
389
 
390
- #: includes/abstracts/abstract-wc-correios-shipping.php:273
391
  msgid "Minimum Length (cm)"
392
  msgstr ""
393
 
394
- #: includes/abstracts/abstract-wc-correios-shipping.php:275
395
  msgid "Minimum length of your shipping packages. Correios needs at least 16cm."
396
  msgstr ""
397
 
398
- #: includes/abstracts/abstract-wc-correios-shipping.php:280
399
  msgid "Extra Weight (kg)"
400
  msgstr ""
401
 
402
- #: includes/abstracts/abstract-wc-correios-shipping.php:282
403
  msgid ""
404
  "Extra weight in kilograms to add to the package total when quoting shipping "
405
  "costs."
@@ -486,6 +501,24 @@ msgstr ""
486
  msgid "Invalid postcode."
487
  msgstr ""
488
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
489
  #: includes/class-wc-correios-rest-api.php:74
490
  msgid "Correios tracking code."
491
  msgstr ""
@@ -583,121 +616,121 @@ msgstr ""
583
  msgid "Correios"
584
  msgstr ""
585
 
586
- #: includes/integrations/class-wc-correios-integration.php:71
587
- #: includes/integrations/class-wc-correios-integration.php:87
588
  msgid "Tracking History Table"
589
  msgstr ""
590
 
591
- #: includes/integrations/class-wc-correios-integration.php:73
592
- #: includes/integrations/class-wc-correios-integration.php:92
593
  msgid ""
594
  "Displays a table with informations about the shipping in My Account > View "
595
  "Order page."
596
  msgstr ""
597
 
598
- #: includes/integrations/class-wc-correios-integration.php:78
599
  msgid "Enable Tracking History Table"
600
  msgstr ""
601
 
602
- #: includes/integrations/class-wc-correios-integration.php:84
603
  msgid "Enable logging for Tracking History"
604
  msgstr ""
605
 
606
- #: includes/integrations/class-wc-correios-integration.php:90
607
- #: includes/integrations/class-wc-correios-integration.php:152
608
  msgid "Autofill Addresses"
609
  msgstr ""
610
 
611
- #: includes/integrations/class-wc-correios-integration.php:97
612
  msgid "Enable Autofill Addresses"
613
  msgstr ""
614
 
615
- #: includes/integrations/class-wc-correios-integration.php:101
616
  msgid "Postcodes Validity"
617
  msgstr ""
618
 
619
- #: includes/integrations/class-wc-correios-integration.php:105
620
  msgid ""
621
  "Defines how long a postcode will stay saved in the database before a new "
622
  "query."
623
  msgstr ""
624
 
625
- #: includes/integrations/class-wc-correios-integration.php:107
626
  msgid "1 month"
627
  msgstr ""
628
 
629
- #: includes/integrations/class-wc-correios-integration.php:109
630
- #: includes/integrations/class-wc-correios-integration.php:111
631
- #: includes/integrations/class-wc-correios-integration.php:113
632
- #: includes/integrations/class-wc-correios-integration.php:115
633
- #: includes/integrations/class-wc-correios-integration.php:117
634
- #: includes/integrations/class-wc-correios-integration.php:119
635
- #: includes/integrations/class-wc-correios-integration.php:121
636
- #: includes/integrations/class-wc-correios-integration.php:123
637
- #: includes/integrations/class-wc-correios-integration.php:125
638
- #: includes/integrations/class-wc-correios-integration.php:127
639
- #: includes/integrations/class-wc-correios-integration.php:129
640
  #. translators: %s number of months
641
  msgid "%d months"
642
  msgstr ""
643
 
644
- #: includes/integrations/class-wc-correios-integration.php:130
645
  msgid "Forever"
646
  msgstr ""
647
 
648
- #: includes/integrations/class-wc-correios-integration.php:134
649
  msgid "Force Autofill"
650
  msgstr ""
651
 
652
- #: includes/integrations/class-wc-correios-integration.php:136
653
  msgid "Enable Force Autofill"
654
  msgstr ""
655
 
656
- #: includes/integrations/class-wc-correios-integration.php:137
657
  msgid ""
658
  "When enabled will autofill all addresses after the user finish to fill the "
659
  "postcode, even if the addresses are already filled."
660
  msgstr ""
661
 
662
- #: includes/integrations/class-wc-correios-integration.php:141
663
- #: includes/integrations/class-wc-correios-integration.php:143
664
  msgid "Empty Database"
665
  msgstr ""
666
 
667
- #: includes/integrations/class-wc-correios-integration.php:144
668
  msgid ""
669
  "Delete all the saved postcodes in the database, use this option if you have "
670
  "issues with outdated postcodes."
671
  msgstr ""
672
 
673
- #: includes/integrations/class-wc-correios-integration.php:149
674
  msgid "Enable logging for Autofill Addresses"
675
  msgstr ""
676
 
677
- #: includes/integrations/class-wc-correios-integration.php:172
678
  #. translators: %s: SOAP documentation link
679
  msgid ""
680
  "It's required have installed the %s on your server in order to integrate "
681
  "with the services of the Correios!"
682
  msgstr ""
683
 
684
- #: includes/integrations/class-wc-correios-integration.php:172
685
  msgid "SOAP module"
686
  msgstr ""
687
 
688
- #: includes/integrations/class-wc-correios-integration.php:181
689
  msgid "Are you sure you want to delete all postcodes from the database?"
690
  msgstr ""
691
 
692
- #: includes/integrations/class-wc-correios-integration.php:286
693
  msgid "Missing parameters!"
694
  msgstr ""
695
 
696
- #: includes/integrations/class-wc-correios-integration.php:291
697
  msgid "Invalid nonce!"
698
  msgstr ""
699
 
700
- #: includes/integrations/class-wc-correios-integration.php:300
701
  msgid "Postcode database emptied successfully!"
702
  msgstr ""
703
 
@@ -705,11 +738,6 @@ msgstr ""
705
  msgid "Carta Registrada"
706
  msgstr ""
707
 
708
- #: includes/shipping/class-wc-correios-shipping-esedex.php:34
709
- #: includes/shipping/class-wc-correios-shipping-legacy.php:189
710
- msgid "e-SEDEX"
711
- msgstr ""
712
-
713
  #: includes/shipping/class-wc-correios-shipping-impresso-normal.php:46
714
  msgid "Impresso Normal"
715
  msgstr ""
@@ -818,6 +846,10 @@ msgstr ""
818
  msgid "Shipping via SEDEX Hoje."
819
  msgstr ""
820
 
 
 
 
 
821
  #: includes/shipping/class-wc-correios-shipping-legacy.php:192
822
  msgid "Shipping via e-SEDEX."
823
  msgstr ""
@@ -888,25 +920,19 @@ msgstr ""
888
  msgid "SEDEX 12"
889
  msgstr ""
890
 
891
- #: includes/wc-correios-functions.php:75
892
- msgid "Delivery within %d working day"
893
- msgid_plural "Delivery within %d working days"
894
- msgstr[0] ""
895
- msgstr[1] ""
896
-
897
- #: includes/wc-correios-functions.php:106
898
  msgid "System temporarily down. Please try again later."
899
  msgstr ""
900
 
901
- #: includes/wc-correios-functions.php:107
902
  msgid "Invalid zip code."
903
  msgstr ""
904
 
905
- #: includes/wc-correios-functions.php:108
906
  msgid "Area with delivery temporarily subjected to different periods."
907
  msgstr ""
908
 
909
- #: includes/wc-correios-functions.php:109
910
  msgid ""
911
  "The destination CEP is subject to special delivery conditions by ECT and "
912
  "will be carried out with the addition of up to 7 (seven) business days to "
@@ -914,10 +940,12 @@ msgid ""
914
  msgstr ""
915
 
916
  #: includes/wc-correios-functions.php:200
 
917
  msgid "Added a Correios tracking code: %s"
918
  msgstr ""
919
 
920
- #: includes/wc-correios-functions.php:219
 
921
  msgid "Removed a Correios tracking code: %s"
922
  msgstr ""
923
 
1
+ # Copyright (C) 2018 Claudio Sanches
2
  # This file is distributed under the GPLv2 or later.
3
  msgid ""
4
  msgstr ""
5
+ "Project-Id-Version: WooCommerce Correios 3.7.0\n"
6
  "Report-Msgid-Bugs-To: "
7
  "https://wordpress.org/support/plugin/woocommerce-correios\n"
8
+ "POT-Creation-Date: 2018-05-08 03:05:35+00:00\n"
9
  "MIME-Version: 1.0\n"
10
  "Content-Type: text/plain; charset=utf-8\n"
11
  "Content-Transfer-Encoding: 8bit\n"
12
+ "PO-Revision-Date: 2018-MO-DA HO:MI+ZONE\n"
13
  "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
14
  "Language-Team: LANGUAGE <LL@li.org>\n"
15
  "X-Generator: grunt-wp-i18n 0.5.4\n"
16
 
17
+ #: includes/abstracts/class-wc-correios-shipping-carta.php:26
18
+ #: includes/abstracts/class-wc-correios-shipping-impresso.php:78
19
+ #: includes/abstracts/class-wc-correios-shipping.php:43
20
+ #. translators: %s: method title
21
  msgid "%s is a shipping method from Correios."
22
  msgstr ""
23
 
24
+ #: includes/abstracts/class-wc-correios-shipping-carta.php:64
25
  msgid "-- Select a shipping class --"
26
  msgstr ""
27
 
28
+ #: includes/abstracts/class-wc-correios-shipping-carta.php:80
29
+ #: includes/abstracts/class-wc-correios-shipping-impresso.php:115
30
+ #: includes/abstracts/class-wc-correios-shipping-international.php:57
31
+ #: includes/abstracts/class-wc-correios-shipping.php:126
32
  #: includes/emails/class-wc-correios-tracking-email.php:50
33
+ #: includes/integrations/class-wc-correios-integration.php:79
34
+ #: includes/integrations/class-wc-correios-integration.php:112
35
  #: includes/shipping/class-wc-correios-shipping-legacy.php:79
36
  msgid "Enable/Disable"
37
  msgstr ""
38
 
39
+ #: includes/abstracts/class-wc-correios-shipping-carta.php:82
40
+ #: includes/abstracts/class-wc-correios-shipping-impresso.php:117
41
+ #: includes/abstracts/class-wc-correios-shipping-international.php:59
42
+ #: includes/abstracts/class-wc-correios-shipping.php:128
43
  #: includes/shipping/class-wc-correios-shipping-legacy.php:81
44
  msgid "Enable this shipping method"
45
  msgstr ""
46
 
47
+ #: includes/abstracts/class-wc-correios-shipping-carta.php:86
48
+ #: includes/abstracts/class-wc-correios-shipping-impresso.php:121
49
+ #: includes/abstracts/class-wc-correios-shipping-international.php:63
50
+ #: includes/abstracts/class-wc-correios-shipping.php:132
51
  #: includes/shipping/class-wc-correios-shipping-legacy.php:85
52
  msgid "Title"
53
  msgstr ""
54
 
55
+ #: includes/abstracts/class-wc-correios-shipping-carta.php:88
56
+ #: includes/abstracts/class-wc-correios-shipping-impresso.php:123
57
+ #: includes/abstracts/class-wc-correios-shipping-international.php:65
58
+ #: includes/abstracts/class-wc-correios-shipping.php:134
59
  #: includes/shipping/class-wc-correios-shipping-legacy.php:87
60
  msgid "This controls the title which the user sees during checkout."
61
  msgstr ""
62
 
63
+ #: includes/abstracts/class-wc-correios-shipping-carta.php:93
64
+ #: includes/abstracts/class-wc-correios-shipping-impresso.php:128
65
+ #: includes/abstracts/class-wc-correios-shipping-international.php:70
66
+ #: includes/abstracts/class-wc-correios-shipping.php:139
67
  msgid "Behavior Options"
68
  msgstr ""
69
 
70
+ #: includes/abstracts/class-wc-correios-shipping-carta.php:98
71
+ #: includes/abstracts/class-wc-correios-shipping-impresso.php:133
72
+ #: includes/abstracts/class-wc-correios-shipping-international.php:96
73
+ #: includes/abstracts/class-wc-correios-shipping.php:152
74
  msgid "Shipping Class"
75
  msgstr ""
76
 
77
+ #: includes/abstracts/class-wc-correios-shipping-carta.php:100
78
+ #: includes/abstracts/class-wc-correios-shipping-impresso.php:135
79
  msgid "Select for which shipping class this method will be applied."
80
  msgstr ""
81
 
82
+ #: includes/abstracts/class-wc-correios-shipping-carta.php:107
83
+ #: includes/abstracts/class-wc-correios-shipping-impresso.php:156
84
+ #: includes/abstracts/class-wc-correios-shipping-international.php:105
85
+ #: includes/abstracts/class-wc-correios-shipping.php:161
86
  msgid "Delivery Time"
87
  msgstr ""
88
 
89
+ #: includes/abstracts/class-wc-correios-shipping-carta.php:109
90
+ #: includes/abstracts/class-wc-correios-shipping-impresso.php:158
91
+ #: includes/abstracts/class-wc-correios-shipping-international.php:107
92
+ #: includes/abstracts/class-wc-correios-shipping.php:163
93
  msgid "Show estimated delivery time"
94
  msgstr ""
95
 
96
+ #: includes/abstracts/class-wc-correios-shipping-carta.php:110
97
+ #: includes/abstracts/class-wc-correios-shipping-impresso.php:159
98
+ #: includes/abstracts/class-wc-correios-shipping-international.php:108
99
+ #: includes/abstracts/class-wc-correios-shipping.php:164
100
  msgid "Display the estimated delivery time in working days."
101
  msgstr ""
102
 
103
+ #: includes/abstracts/class-wc-correios-shipping-carta.php:115
104
+ #: includes/abstracts/class-wc-correios-shipping-impresso.php:164
105
  msgid "Delivery Days"
106
  msgstr ""
107
 
108
+ #: includes/abstracts/class-wc-correios-shipping-carta.php:117
109
+ #: includes/abstracts/class-wc-correios-shipping-impresso.php:166
110
  msgid "Working days to the estimated delivery."
111
  msgstr ""
112
 
113
+ #: includes/abstracts/class-wc-correios-shipping-carta.php:123
114
+ #: includes/abstracts/class-wc-correios-shipping-impresso.php:172
115
+ msgid "Extra Weight (g)"
116
+ msgstr ""
117
+
118
+ #: includes/abstracts/class-wc-correios-shipping-carta.php:125
119
+ #: includes/abstracts/class-wc-correios-shipping-impresso.php:174
120
+ msgid ""
121
+ "Extra weight in grams to add to the package total when quoting shipping "
122
+ "costs."
123
+ msgstr ""
124
+
125
+ #: includes/abstracts/class-wc-correios-shipping-carta.php:130
126
+ #: includes/abstracts/class-wc-correios-shipping-impresso.php:179
127
+ #: includes/abstracts/class-wc-correios-shipping-international.php:113
128
+ #: includes/abstracts/class-wc-correios-shipping.php:177
129
  #: includes/shipping/class-wc-correios-shipping-legacy.php:123
130
  msgid "Handling Fee"
131
  msgstr ""
132
 
133
+ #: includes/abstracts/class-wc-correios-shipping-carta.php:132
134
+ #: includes/abstracts/class-wc-correios-shipping-impresso.php:181
135
+ #: includes/abstracts/class-wc-correios-shipping-international.php:115
136
+ #: includes/abstracts/class-wc-correios-shipping.php:179
137
  #: includes/shipping/class-wc-correios-shipping-legacy.php:125
138
  msgid ""
139
  "Enter an amount, e.g. 2.50, or a percentage, e.g. 5%. Leave blank to "
140
  "disable."
141
  msgstr ""
142
 
143
+ #: includes/abstracts/class-wc-correios-shipping-carta.php:138
144
+ #: includes/abstracts/class-wc-correios-shipping-impresso.php:187
145
+ #: includes/abstracts/class-wc-correios-shipping-international.php:121
146
+ #: includes/abstracts/class-wc-correios-shipping.php:185
147
  msgid "Optional Services"
148
  msgstr ""
149
 
150
+ #: includes/abstracts/class-wc-correios-shipping-carta.php:140
151
+ #: includes/abstracts/class-wc-correios-shipping-impresso.php:189
152
+ #: includes/abstracts/class-wc-correios-shipping-international.php:123
153
+ #: includes/abstracts/class-wc-correios-shipping.php:187
154
  msgid "Use these options to add the value of each service provided by the Correios."
155
  msgstr ""
156
 
157
+ #: includes/abstracts/class-wc-correios-shipping-carta.php:144
158
+ #: includes/abstracts/class-wc-correios-shipping-impresso.php:193
159
+ #: includes/abstracts/class-wc-correios-shipping.php:191
160
  msgid "Receipt Notice"
161
  msgstr ""
162
 
163
+ #: includes/abstracts/class-wc-correios-shipping-carta.php:146
164
+ #: includes/abstracts/class-wc-correios-shipping-impresso.php:195
165
+ #: includes/abstracts/class-wc-correios-shipping.php:193
166
  msgid "Enable receipt notice"
167
  msgstr ""
168
 
169
+ #: includes/abstracts/class-wc-correios-shipping-carta.php:147
170
+ #: includes/abstracts/class-wc-correios-shipping-impresso.php:196
171
+ #: includes/abstracts/class-wc-correios-shipping.php:194
172
  msgid "This controls whether to add costs of the receipt notice service."
173
  msgstr ""
174
 
175
+ #: includes/abstracts/class-wc-correios-shipping-carta.php:152
176
+ #: includes/abstracts/class-wc-correios-shipping-impresso.php:201
177
+ #: includes/abstracts/class-wc-correios-shipping.php:199
178
  msgid "Own Hands"
179
  msgstr ""
180
 
181
+ #: includes/abstracts/class-wc-correios-shipping-carta.php:154
182
+ #: includes/abstracts/class-wc-correios-shipping-impresso.php:203
183
+ #: includes/abstracts/class-wc-correios-shipping.php:201
184
  msgid "Enable own hands"
185
  msgstr ""
186
 
187
+ #: includes/abstracts/class-wc-correios-shipping-carta.php:155
188
+ #: includes/abstracts/class-wc-correios-shipping-impresso.php:204
189
+ #: includes/abstracts/class-wc-correios-shipping.php:202
190
  msgid "This controls whether to add costs of the own hands service"
191
  msgstr ""
192
 
193
+ #: includes/abstracts/class-wc-correios-shipping-carta.php:160
194
+ #: includes/abstracts/class-wc-correios-shipping-impresso.php:209
195
+ #: includes/abstracts/class-wc-correios-shipping-international.php:127
196
+ #: includes/abstracts/class-wc-correios-shipping.php:288
197
  #: includes/shipping/class-wc-correios-shipping-legacy.php:224
198
  msgid "Testing"
199
  msgstr ""
200
 
201
+ #: includes/abstracts/class-wc-correios-shipping-carta.php:165
202
+ #: includes/abstracts/class-wc-correios-shipping-impresso.php:214
203
+ #: includes/abstracts/class-wc-correios-shipping-international.php:132
204
+ #: includes/abstracts/class-wc-correios-shipping.php:293
205
+ #: includes/integrations/class-wc-correios-integration.php:99
206
+ #: includes/integrations/class-wc-correios-integration.php:164
207
  #: includes/shipping/class-wc-correios-shipping-legacy.php:228
208
  msgid "Debug Log"
209
  msgstr ""
210
 
211
+ #: includes/abstracts/class-wc-correios-shipping-carta.php:167
212
+ #: includes/abstracts/class-wc-correios-shipping-impresso.php:216
213
+ #: includes/abstracts/class-wc-correios-shipping-international.php:134
214
+ #: includes/abstracts/class-wc-correios-shipping.php:295
215
  #: includes/shipping/class-wc-correios-shipping-legacy.php:230
216
  msgid "Enable logging"
217
  msgstr ""
218
 
219
+ #: includes/abstracts/class-wc-correios-shipping-carta.php:169
220
+ #: includes/abstracts/class-wc-correios-shipping-impresso.php:218
221
+ #: includes/abstracts/class-wc-correios-shipping-international.php:136
222
+ #: includes/abstracts/class-wc-correios-shipping.php:298
223
+ #: includes/integrations/class-wc-correios-integration.php:104
224
+ #: includes/integrations/class-wc-correios-integration.php:169
225
+ #. translators: %s: method title
226
  #. translators: %s: log link
227
  msgid "Log %s events, such as WebServices requests."
228
  msgstr ""
229
 
230
+ #: includes/abstracts/class-wc-correios-shipping-impresso.php:142
231
  msgid "Registry Type"
232
  msgstr ""
233
 
234
+ #: includes/abstracts/class-wc-correios-shipping-impresso.php:144
235
  msgid "Select for which registry type this method will be applied."
236
  msgstr ""
237
 
238
+ #: includes/abstracts/class-wc-correios-shipping-impresso.php:149
239
  msgid "-- Select a registry type --"
240
  msgstr ""
241
 
242
+ #: includes/abstracts/class-wc-correios-shipping-impresso.php:150
243
  msgid "Registro Nacional"
244
  msgstr ""
245
 
246
+ #: includes/abstracts/class-wc-correios-shipping-impresso.php:151
247
  msgid "Registro Módico"
248
  msgstr ""
249
 
250
+ #: includes/abstracts/class-wc-correios-shipping-international.php:28
251
  msgid "%s is a international shipping method from Correios."
252
  msgstr ""
253
 
254
+ #: includes/abstracts/class-wc-correios-shipping-international.php:75
255
  msgid "Origin State"
256
  msgstr ""
257
 
258
+ #: includes/abstracts/class-wc-correios-shipping-international.php:77
259
  msgid "The UF of the location your packages are delivered from."
260
  msgstr ""
261
 
262
+ #: includes/abstracts/class-wc-correios-shipping-international.php:84
263
  msgid "Origin Locale"
264
  msgstr ""
265
 
266
+ #: includes/abstracts/class-wc-correios-shipping-international.php:86
267
  msgid "The location of your packages are delivered from."
268
  msgstr ""
269
 
270
+ #: includes/abstracts/class-wc-correios-shipping-international.php:91
271
  msgid "Capital"
272
  msgstr ""
273
 
274
+ #: includes/abstracts/class-wc-correios-shipping-international.php:92
275
  msgid "Interior"
276
  msgstr ""
277
 
278
+ #: includes/abstracts/class-wc-correios-shipping-international.php:98
279
+ #: includes/abstracts/class-wc-correios-shipping.php:154
280
  msgid "If necessary, select a shipping class to apply this method."
281
  msgstr ""
282
 
283
+ #: includes/abstracts/class-wc-correios-shipping.php:83
284
+ #: includes/integrations/class-wc-correios-integration.php:65
285
  msgid "View logs."
286
  msgstr ""
287
 
288
+ #: includes/abstracts/class-wc-correios-shipping.php:109
289
  msgid "Any Shipping Class"
290
  msgstr ""
291
 
292
+ #: includes/abstracts/class-wc-correios-shipping.php:110
293
  msgid "No Shipping Class"
294
  msgstr ""
295
 
296
+ #: includes/abstracts/class-wc-correios-shipping.php:144
297
  msgid "Origin Postcode"
298
  msgstr ""
299
 
300
+ #: includes/abstracts/class-wc-correios-shipping.php:146
301
  msgid "The postcode of the location your packages are delivered from."
302
  msgstr ""
303
 
304
+ #: includes/abstracts/class-wc-correios-shipping.php:169
305
  msgid "Additional Days"
306
  msgstr ""
307
 
308
+ #: includes/abstracts/class-wc-correios-shipping.php:171
309
  msgid "Additional working days to the estimated delivery."
310
  msgstr ""
311
 
312
+ #: includes/abstracts/class-wc-correios-shipping.php:207
313
  msgid "Declare Value for Insurance"
314
  msgstr ""
315
 
316
+ #: includes/abstracts/class-wc-correios-shipping.php:209
317
  msgid "Enable declared value"
318
  msgstr ""
319
 
320
+ #: includes/abstracts/class-wc-correios-shipping.php:210
321
  msgid ""
322
  "This controls if the price of the package must be declared for insurance "
323
  "purposes."
324
  msgstr ""
325
 
326
+ #: includes/abstracts/class-wc-correios-shipping.php:215
327
  msgid "Service Options"
328
  msgstr ""
329
 
330
+ #: includes/abstracts/class-wc-correios-shipping.php:220
331
  msgid "Service Code"
332
  msgstr ""
333
 
334
+ #: includes/abstracts/class-wc-correios-shipping.php:222
335
  msgid "Service code, use this for custom codes."
336
  msgstr ""
337
 
338
+ #: includes/abstracts/class-wc-correios-shipping.php:228
 
339
  msgid "Service Type"
340
  msgstr ""
341
 
342
+ #: includes/abstracts/class-wc-correios-shipping.php:230
 
343
  #: includes/shipping/class-wc-correios-shipping-legacy.php:136
344
  msgid "Choose between conventional or corporate service."
345
  msgstr ""
346
 
347
+ #: includes/abstracts/class-wc-correios-shipping.php:235
348
  #: includes/shipping/class-wc-correios-shipping-legacy.php:140
349
  msgid "Conventional"
350
  msgstr ""
351
 
352
+ #: includes/abstracts/class-wc-correios-shipping.php:236
 
353
  #: includes/shipping/class-wc-correios-shipping-legacy.php:141
354
  msgid "Corporate"
355
  msgstr ""
356
 
357
+ #: includes/abstracts/class-wc-correios-shipping.php:240
358
+ #: includes/integrations/class-wc-correios-integration.php:85
359
  #: includes/shipping/class-wc-correios-shipping-legacy.php:145
360
  msgid "Administrative Code"
361
  msgstr ""
362
 
363
+ #: includes/abstracts/class-wc-correios-shipping.php:242
364
+ #: includes/integrations/class-wc-correios-integration.php:87
365
  msgid "Your Correios login. It's usually your CNPJ."
366
  msgstr ""
367
 
368
+ #: includes/abstracts/class-wc-correios-shipping.php:247
369
+ #: includes/integrations/class-wc-correios-integration.php:92
370
  #: includes/shipping/class-wc-correios-shipping-legacy.php:151
371
  msgid "Administrative Password"
372
  msgstr ""
373
 
374
+ #: includes/abstracts/class-wc-correios-shipping.php:249
375
+ #: includes/integrations/class-wc-correios-integration.php:94
376
  #: includes/shipping/class-wc-correios-shipping-legacy.php:153
377
  msgid "Your Correios password."
378
  msgstr ""
379
 
380
+ #: includes/abstracts/class-wc-correios-shipping.php:254
381
  #: includes/shipping/class-wc-correios-shipping-legacy.php:197
382
  msgid "Package Standard"
383
  msgstr ""
384
 
385
+ #: includes/abstracts/class-wc-correios-shipping.php:256
386
  msgid "Minimum measure for your shipping packages."
387
  msgstr ""
388
 
389
+ #: includes/abstracts/class-wc-correios-shipping.php:260
390
  msgid "Minimum Height (cm)"
391
  msgstr ""
392
 
393
+ #: includes/abstracts/class-wc-correios-shipping.php:262
394
  msgid "Minimum height of your shipping packages. Correios needs at least 2cm."
395
  msgstr ""
396
 
397
+ #: includes/abstracts/class-wc-correios-shipping.php:267
398
  msgid "Minimum Width (cm)"
399
  msgstr ""
400
 
401
+ #: includes/abstracts/class-wc-correios-shipping.php:269
402
  msgid "Minimum width of your shipping packages. Correios needs at least 11cm."
403
  msgstr ""
404
 
405
+ #: includes/abstracts/class-wc-correios-shipping.php:274
406
  msgid "Minimum Length (cm)"
407
  msgstr ""
408
 
409
+ #: includes/abstracts/class-wc-correios-shipping.php:276
410
  msgid "Minimum length of your shipping packages. Correios needs at least 16cm."
411
  msgstr ""
412
 
413
+ #: includes/abstracts/class-wc-correios-shipping.php:281
414
  msgid "Extra Weight (kg)"
415
  msgstr ""
416
 
417
+ #: includes/abstracts/class-wc-correios-shipping.php:283
418
  msgid ""
419
  "Extra weight in kilograms to add to the package total when quoting shipping "
420
  "costs."
501
  msgid "Invalid postcode."
502
  msgstr ""
503
 
504
+ #: includes/class-wc-correios-cart.php:35 includes/wc-correios-functions.php:74
505
+ #. translators: %d: days to delivery
506
+ msgid "Delivery within %d working day"
507
+ msgid_plural "Delivery within %d working days"
508
+ msgstr[0] ""
509
+ msgstr[1] ""
510
+
511
+ #: includes/class-wc-correios-orders.php:40
512
+ #. translators: 1: shipping method name 2: days to delivery
513
+ msgid "%1$s (delivery within %2$d working day after paid)"
514
+ msgid_plural "%1$s (delivery within %2$d working days after paid)"
515
+ msgstr[0] ""
516
+ msgstr[1] ""
517
+
518
+ #: includes/class-wc-correios-orders.php:57
519
+ msgid "Delivery forecast"
520
+ msgstr ""
521
+
522
  #: includes/class-wc-correios-rest-api.php:74
523
  msgid "Correios tracking code."
524
  msgstr ""
616
  msgid "Correios"
617
  msgstr ""
618
 
619
+ #: includes/integrations/class-wc-correios-integration.php:74
620
+ #: includes/integrations/class-wc-correios-integration.php:104
621
  msgid "Tracking History Table"
622
  msgstr ""
623
 
624
+ #: includes/integrations/class-wc-correios-integration.php:76
625
+ #: includes/integrations/class-wc-correios-integration.php:109
626
  msgid ""
627
  "Displays a table with informations about the shipping in My Account > View "
628
  "Order page."
629
  msgstr ""
630
 
631
+ #: includes/integrations/class-wc-correios-integration.php:81
632
  msgid "Enable Tracking History Table"
633
  msgstr ""
634
 
635
+ #: includes/integrations/class-wc-correios-integration.php:101
636
  msgid "Enable logging for Tracking History"
637
  msgstr ""
638
 
639
+ #: includes/integrations/class-wc-correios-integration.php:107
640
+ #: includes/integrations/class-wc-correios-integration.php:169
641
  msgid "Autofill Addresses"
642
  msgstr ""
643
 
644
+ #: includes/integrations/class-wc-correios-integration.php:114
645
  msgid "Enable Autofill Addresses"
646
  msgstr ""
647
 
648
+ #: includes/integrations/class-wc-correios-integration.php:118
649
  msgid "Postcodes Validity"
650
  msgstr ""
651
 
652
+ #: includes/integrations/class-wc-correios-integration.php:122
653
  msgid ""
654
  "Defines how long a postcode will stay saved in the database before a new "
655
  "query."
656
  msgstr ""
657
 
658
+ #: includes/integrations/class-wc-correios-integration.php:124
659
  msgid "1 month"
660
  msgstr ""
661
 
662
+ #: includes/integrations/class-wc-correios-integration.php:126
663
+ #: includes/integrations/class-wc-correios-integration.php:128
664
+ #: includes/integrations/class-wc-correios-integration.php:130
665
+ #: includes/integrations/class-wc-correios-integration.php:132
666
+ #: includes/integrations/class-wc-correios-integration.php:134
667
+ #: includes/integrations/class-wc-correios-integration.php:136
668
+ #: includes/integrations/class-wc-correios-integration.php:138
669
+ #: includes/integrations/class-wc-correios-integration.php:140
670
+ #: includes/integrations/class-wc-correios-integration.php:142
671
+ #: includes/integrations/class-wc-correios-integration.php:144
672
+ #: includes/integrations/class-wc-correios-integration.php:146
673
  #. translators: %s number of months
674
  msgid "%d months"
675
  msgstr ""
676
 
677
+ #: includes/integrations/class-wc-correios-integration.php:147
678
  msgid "Forever"
679
  msgstr ""
680
 
681
+ #: includes/integrations/class-wc-correios-integration.php:151
682
  msgid "Force Autofill"
683
  msgstr ""
684
 
685
+ #: includes/integrations/class-wc-correios-integration.php:153
686
  msgid "Enable Force Autofill"
687
  msgstr ""
688
 
689
+ #: includes/integrations/class-wc-correios-integration.php:154
690
  msgid ""
691
  "When enabled will autofill all addresses after the user finish to fill the "
692
  "postcode, even if the addresses are already filled."
693
  msgstr ""
694
 
695
+ #: includes/integrations/class-wc-correios-integration.php:158
696
+ #: includes/integrations/class-wc-correios-integration.php:160
697
  msgid "Empty Database"
698
  msgstr ""
699
 
700
+ #: includes/integrations/class-wc-correios-integration.php:161
701
  msgid ""
702
  "Delete all the saved postcodes in the database, use this option if you have "
703
  "issues with outdated postcodes."
704
  msgstr ""
705
 
706
+ #: includes/integrations/class-wc-correios-integration.php:166
707
  msgid "Enable logging for Autofill Addresses"
708
  msgstr ""
709
 
710
+ #: includes/integrations/class-wc-correios-integration.php:189
711
  #. translators: %s: SOAP documentation link
712
  msgid ""
713
  "It's required have installed the %s on your server in order to integrate "
714
  "with the services of the Correios!"
715
  msgstr ""
716
 
717
+ #: includes/integrations/class-wc-correios-integration.php:189
718
  msgid "SOAP module"
719
  msgstr ""
720
 
721
+ #: includes/integrations/class-wc-correios-integration.php:198
722
  msgid "Are you sure you want to delete all postcodes from the database?"
723
  msgstr ""
724
 
725
+ #: includes/integrations/class-wc-correios-integration.php:320
726
  msgid "Missing parameters!"
727
  msgstr ""
728
 
729
+ #: includes/integrations/class-wc-correios-integration.php:325
730
  msgid "Invalid nonce!"
731
  msgstr ""
732
 
733
+ #: includes/integrations/class-wc-correios-integration.php:334
734
  msgid "Postcode database emptied successfully!"
735
  msgstr ""
736
 
738
  msgid "Carta Registrada"
739
  msgstr ""
740
 
 
 
 
 
 
741
  #: includes/shipping/class-wc-correios-shipping-impresso-normal.php:46
742
  msgid "Impresso Normal"
743
  msgstr ""
846
  msgid "Shipping via SEDEX Hoje."
847
  msgstr ""
848
 
849
+ #: includes/shipping/class-wc-correios-shipping-legacy.php:189
850
+ msgid "e-SEDEX"
851
+ msgstr ""
852
+
853
  #: includes/shipping/class-wc-correios-shipping-legacy.php:192
854
  msgid "Shipping via e-SEDEX."
855
  msgstr ""
920
  msgid "SEDEX 12"
921
  msgstr ""
922
 
923
+ #: includes/wc-correios-functions.php:105
 
 
 
 
 
 
924
  msgid "System temporarily down. Please try again later."
925
  msgstr ""
926
 
927
+ #: includes/wc-correios-functions.php:106
928
  msgid "Invalid zip code."
929
  msgstr ""
930
 
931
+ #: includes/wc-correios-functions.php:107
932
  msgid "Area with delivery temporarily subjected to different periods."
933
  msgstr ""
934
 
935
+ #: includes/wc-correios-functions.php:108
936
  msgid ""
937
  "The destination CEP is subject to special delivery conditions by ECT and "
938
  "will be carried out with the addition of up to 7 (seven) business days to "
940
  msgstr ""
941
 
942
  #: includes/wc-correios-functions.php:200
943
+ #. translators: %s: tracking code
944
  msgid "Added a Correios tracking code: %s"
945
  msgstr ""
946
 
947
+ #: includes/wc-correios-functions.php:222
948
+ #. translators: %s: tracking code
949
  msgid "Removed a Correios tracking code: %s"
950
  msgstr ""
951
 
readme.txt CHANGED
@@ -4,7 +4,7 @@ Donate link: https://claudiosanches.com/doacoes/
4
  Tags: shipping, delivery, woocommerce, correios
5
  Requires at least: 4.0
6
  Tested up to: 4.9
7
- Stable tag: 3.6.0
8
  Requires PHP: 5.6
9
  License: GPLv2 or later
10
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
@@ -204,137 +204,20 @@ Em caso de dúvidas, basta abrir um tópico no [fórum de suporte do plugin](htt
204
 
205
  == Changelog ==
206
 
207
- = 3.6.0 - 2017/11/19 =
208
 
209
- - Atualizado o valor mínimo declarado para 18 reais.
210
- - Melhorias gerais no código base do plugin.
 
 
211
 
212
- = 3.5.1 - 2017/10/26 =
213
-
214
- - Usa por padrão o CEP de base do WooCommerce 3.2 ao adicionar um novo método de entrega.
215
- - Correção do valor declarado para PAC, que ainda não aceitava o pedido quando o valor era igual a 17 reais.
216
- - Correção do peso máximo para Impresso Normal.
217
-
218
- = 3.5.0 - 2017/10/06 =
219
-
220
- - Adicionada opção para adicionar peso extra por pacote.
221
- - Adicionado suporte para entrega em áreas de risco.
222
- - Corrigido problema de valor declaro do PAC.
223
-
224
- = 3.4.1 - 2017/05/17 =
225
-
226
- - Restaurado o suporte de valores em porcentagem para "Taxa de manuseio".
227
-
228
- = 3.4.0 - 2017/05/13 =
229
-
230
- - Adicionado novamente links para os códigos de rastreamento na detalhes do pedido no admin.
231
- - Adicionado novos links com código de rastreamneto na lista de pedidos no admin.
232
- - Corrigido códigos de rastreamento que ainda não foram atualizados na página de detalhes do pedido em "Minha conta".
233
-
234
- = 3.3.0 - 2017/05/05 =
235
-
236
- - Atualizados os códigos do PAC e Sedex.
237
- - Atualizada a forma que são exibidos os códigos de rastreamento, uma vez que os Correios desativou o link que era utilizado.
238
-
239
- = 3.2.2 - 2017/03/14 =
240
-
241
- - Corrigido o salvamento dos códigos de rastreamento em versões anteriores ao WooCommerce 3.0.
242
- - Corrigida compatibilidade com o envio de e-mails dos códigos de rastreamento no WooCommerce 3.0.
243
-
244
- = 3.2.1 - 2017/03/08 =
245
-
246
- - Corrigida compatiblidade com PHP 5.2 e 5.3 na nova ferramenta de cadastro de código de rastreamento.
247
-
248
- = 3.2.0 - 2017/03/07 =
249
-
250
- - Adicionado suporte para o WooCommerce 3.0.
251
- - Atualizados os valores do Impresso Normal e Impresso Urgente (Obrigado Alex Koti).
252
- - Adicionado suporte para vários códigos de rastreamento para cada pedido.
253
- - Adicionado suporte a classes de entrega para todos os métodos de entrega.
254
- - Corrigida compatibilidade com PHP 7.1.
255
-
256
- = 3.1.7 - 2017/01/10 =
257
-
258
- - Corrigido o link de rastreio nas notas do pedido.
259
-
260
- = 3.1.6 - 2017/01/05 =
261
-
262
- - Declara valor para os métodos de sedex apenas se o total do pacote for mais do que 17 reais.
263
- - Adicionada opção manual para estimativa de entrega para os métodos de Impresso e Carta Registrada.
264
- - Corrigida mensagens de alerta do plugin para serem exibidas apenas na página do carrinho.
265
-
266
- = 3.1.5 - 2016/12/31 =
267
-
268
- - Adicionado link para a página de rastreio do pedido nas notas do pedido.
269
- - Corrigido valor declarado utilizando o valor do pacote atual e não do carrinho.
270
- - Adicionado objeto do pacote no filtro `woocommerce_correios_{$method_id}_rate`.
271
-
272
- = 3.1.4 - 2016/12/23 =
273
-
274
- - Adicionada prevenção de erros no PHP quando todos os valores de peso e dimensões estão em branco.
275
- - Introduzido o filtro `woocommerce_correios_get_estimating_delivery` para edição da estimativa de entrega.
276
- - Adicionada informações do pacote nos filtros para tornar possível calcular frete para múltiplos pacotes.
277
- - Adicionada prevenção de erro quando Correios retorna apenas um objeto no rastreio de entrega.
278
-
279
- = 3.1.3 - 2016/09/27 =
280
-
281
- - Corrigido erro quando utilizado código de rastreio incorreto.
282
-
283
- = 3.1.2 - 2016/09/20 =
284
-
285
- - Removida mensagem de erro quando serviço é indisponível no trecho informado, esta mensagem estava causando muita confusão para usuários quando Sedex 10 ou Sedex Hoje estão indisponíveis.
286
-
287
- = 3.1.1 - 2016/09/15 =
288
-
289
- - Corrigida a utilização das classes de entrega para os métodos de Carta Registrada, Impresso Normal e Impresso Urgente.
290
-
291
- = 3.1.0 - 2016/09/13 =
292
-
293
- - Adicionado os métodos Impresso Normal e Impresso Urgente (obrigado a [@jckronbauer](https://github.com/jckronbauer)).
294
- - Adicionada opção para enviar novamente e-mail do código de rastreio.
295
- - Adicionada mensagem de erro quando serviço é indisponível no trecho informado.
296
-
297
- = 3.0.6 - 2016/08/20 =
298
-
299
- - Introduzida a função `wc_correios_get_address_by_postcode()`.
300
- - Removida opção de seguro para métodos internacionais, pois o valor adicionado era o valor do premio do seguro automático.
301
- - Corrigido e-Sedex para aceitar apenas a opção corporativa.
302
-
303
- = 3.0.5 - 2016/07/20 =
304
-
305
- - Corrigido o formato das dimensões e peso para os métodos de entrega internacionais.
306
-
307
- = 3.0.4 - 2016/07/20 =
308
-
309
- - Corrigido o tratamento do XML das métodos internacionais, nos quais os Correios as vezes envia um XML no formato incorreto.
310
-
311
- = 3.0.3 - 2016/06/28 =
312
-
313
- - Corrigida as unidades de medidas dos métodos internacionais.
314
-
315
- = 3.0.2 - 2016/06/28 =
316
-
317
- - Adicionado novo método de Carta Registrada seguindo a tabela dos Correios e com suporte a classes de entrega.
318
-
319
- = 3.0.1 - 2016/06/26 =
320
-
321
- - Corrigido o calculo da taxa de manuseio.
322
-
323
- = 3.0.0 - 2016/06/26 =
324
-
325
- - Reformulação geral de todos o código do plugin.
326
- - Adicionado suporte as áreas de entrega do WooCommerce 2.6.
327
- - Adicionado os métodos de SEDEX 10 Envelope, SEDEX 12, Carta Registrada, Mercadoria Expressa, Mercadoria Econômica e Leve Internacional.
328
- - Adicionado novo menu de "integrações".
329
- - Adicionada integração com o serviço de consulta de CEP e assim adicionando uma opção para autopreencher endereços com base no CEP.
330
- - Atualizada a integração com o sistema que gera o histórico de rastreamento do pedido.
331
- - Removida a opção de simulador de frete na página do produto.
332
- - Integrado o campo de "correios_tracking_code" dos pedidos com a API REST do WooCommerce.
333
- - E mais outras várias alterações que podem ser verificadas pelo [GitHub](https://github.com/claudiosanches/woocommerce-correios/compare/2.3.0...3.0.0).
334
 
335
  == Upgrade Notice ==
336
 
337
- = 3.6.0 =
338
 
339
- - Atualizado o valor mínimo declarado para 18 reais.
340
- - Melhorias gerais no código base do plugin.
 
 
4
  Tags: shipping, delivery, woocommerce, correios
5
  Requires at least: 4.0
6
  Tested up to: 4.9
7
+ Stable tag: 3.7.0
8
  Requires PHP: 5.6
9
  License: GPLv2 or later
10
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
204
 
205
  == Changelog ==
206
 
207
+ = 3.7.0 - 2018/05/08 =
208
 
209
+ - Atualizados os valores do Impresso e Carta, mais detalhes em [#97](https://github.com/claudiosanches/woocommerce-correios/pull/97) e [#100](https://github.com/claudiosanches/woocommerce-correios/pull/100).
210
+ - Adicionada opção para peso extra nos métodos de Impresso e Carta, mais detalhes em [#95](https://github.com/claudiosanches/woocommerce-correios/pull/95).
211
+ - Adicionada opções para usar rastreamento com dados administrativos.
212
+ - Melhorado a exibição e salvamento da estimativa de entrega, mais detalhes em [#98](https://github.com/claudiosanches/woocommerce-correios/pull/98)
213
 
214
+ [See changelog for all versions](https://raw.githubusercontent.com/claudiosanches/woocommerce-correios/master/CHANGELOG.txt).
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
215
 
216
  == Upgrade Notice ==
217
 
218
+ = 3.7.0 =
219
 
220
+ - Atualizados os valores do Impresso e Carta.
221
+ - Adicionada opção para peso extra nos métodos de Impresso e Carta.
222
+ - Adicionada opções para usar rastreamento com dados administrativos.
223
+ - Melhorado a exibição e salvamento da estimativa de entrega.
templates/myaccount/tracking-title.php CHANGED
@@ -12,4 +12,4 @@ if ( ! defined( 'ABSPATH' ) ) {
12
  }
13
  ?>
14
 
15
- <h2 id="#wc-correios-tracking" class="wc-correios-tracking__title"><?php esc_html_e( 'Correios delivery tracking', 'woocommerce-correios' ); ?></h2>
12
  }
13
  ?>
14
 
15
+ <h2 id="wc-correios-tracking" class="wc-correios-tracking__title"><?php esc_html_e( 'Correios delivery tracking', 'woocommerce-correios' ); ?></h2>
woocommerce-correios.php CHANGED
@@ -5,12 +5,12 @@
5
  * Description: Adds Correios shipping methods to your WooCommerce store.
6
  * Author: Claudio Sanches
7
  * Author URI: https://claudiosanches.com
8
- * Version: 3.6.0
9
  * License: GPLv2 or later
10
  * Text Domain: woocommerce-correios
11
  * Domain Path: /languages
12
  * WC requires at least: 3.0.0
13
- * WC tested up to: 3.2.0
14
  *
15
  * WooCommerce Correios is free software: you can redistribute it and/or modify
16
  * it under the terms of the GNU General Public License as published by
@@ -33,7 +33,7 @@ if ( ! defined( 'ABSPATH' ) ) {
33
  exit; // Exit if accessed directly.
34
  }
35
 
36
- define( 'WC_CORREIOS_VERSION', '3.6.0' );
37
  define( 'WC_CORREIOS_PLUGIN_FILE', __FILE__ );
38
 
39
  if ( ! class_exists( 'WC_Correios' ) ) {
5
  * Description: Adds Correios shipping methods to your WooCommerce store.
6
  * Author: Claudio Sanches
7
  * Author URI: https://claudiosanches.com
8
+ * Version: 3.7.0
9
  * License: GPLv2 or later
10
  * Text Domain: woocommerce-correios
11
  * Domain Path: /languages
12
  * WC requires at least: 3.0.0
13
+ * WC tested up to: 3.4.0
14
  *
15
  * WooCommerce Correios is free software: you can redistribute it and/or modify
16
  * it under the terms of the GNU General Public License as published by
33
  exit; // Exit if accessed directly.
34
  }
35
 
36
+ define( 'WC_CORREIOS_VERSION', '3.7.0' );
37
  define( 'WC_CORREIOS_PLUGIN_FILE', __FILE__ );
38
 
39
  if ( ! class_exists( 'WC_Correios' ) ) {