Flexible Shipping for WooCommerce - Version 4.8.0

Version Description

  • 2021-08-23 =
  • Added ability to choose a shipping cost with or without tax
Download this release

Release Info

Developer wpdesk
Plugin Icon 128x128 Flexible Shipping for WooCommerce
Version 4.8.0
Comparing to
See all releases

Code changes from version 4.7.2 to 4.8.0

assets/js/admin.js CHANGED
@@ -91,3 +91,18 @@ jQuery(function($) {
91
 
92
  fs_toggle_free_shipping_notice();
93
  });
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
91
 
92
  fs_toggle_free_shipping_notice();
93
  });
94
+
95
+ /* Tax included in shipping costs */
96
+ jQuery(function($) {
97
+ let tax_status_field = $('#woocommerce_flexible_shipping_tax_status');
98
+
99
+ function fs_toggle_prices_include_tax() {
100
+ $('#woocommerce_flexible_shipping_prices_include_tax').closest('tr').toggle(tax_status_field.val()!=='none');
101
+ }
102
+
103
+ tax_status_field.on('change', function(){
104
+ fs_toggle_prices_include_tax();
105
+ });
106
+
107
+ fs_toggle_prices_include_tax();
108
+ });
assets/js/admin.min.js CHANGED
@@ -6,4 +6,5 @@ while(string.charAt(string.length-1)==charToRemove){string=string.substring(0,st
6
  return string}
7
  jQuery(function($){$(document).on('click','.flexible-shipping-taxes-notice .notice-dismiss',function(){$.ajax(ajaxurl,{type:'POST',data:{action:'flexible_shipping_taxes_notice',}})});$(document).on('click','#enable-fs-connect-box',function(){var fs_connect_checkbox=$('.enable-fs-connect-box');var fs_box_state;if(fs_connect_checkbox.prop('checked')){$('.fs-connect-integration-box').slideDown();fs_box_state=1}else{$('.fs-connect-integration-box').slideUp();fs_box_state=0}
8
  $.ajax(ajaxurl,{type:'POST',data:{action:'update_fs_connect_integration_setting',fs_box_state:fs_box_state}})});$(document).on('click','#flexible_shipping_rate_plugin .close-fs-rate-notice',function(){$('#flexible_shipping_rate_plugin .notice-dismiss').click()});$(document).on('click','#flexible_shipping_rate_plugin .fs-not-good',function(){$('#flexible_shipping_rate_plugin p').html(fs_admin.notice_not_good_enought)});$(document).on('click','.js--button-hints',function(){var label=$(this).text();var second_label=$(this).attr('data-second_label');$(this).toggleClass('open').text(second_label).attr('data-second_label',label);$('.js--hints').slideToggle()})});jQuery(function($){function fs_toggle_free_shipping_notice(){$('#woocommerce_flexible_shipping_method_free_shipping_cart_notice').closest('tr').toggle($('#woocommerce_flexible_shipping_method_free_shipping').val()!=='')}
9
- $('#woocommerce_flexible_shipping_method_free_shipping').on('change',function(){fs_toggle_free_shipping_notice()});fs_toggle_free_shipping_notice()})
 
6
  return string}
7
  jQuery(function($){$(document).on('click','.flexible-shipping-taxes-notice .notice-dismiss',function(){$.ajax(ajaxurl,{type:'POST',data:{action:'flexible_shipping_taxes_notice',}})});$(document).on('click','#enable-fs-connect-box',function(){var fs_connect_checkbox=$('.enable-fs-connect-box');var fs_box_state;if(fs_connect_checkbox.prop('checked')){$('.fs-connect-integration-box').slideDown();fs_box_state=1}else{$('.fs-connect-integration-box').slideUp();fs_box_state=0}
8
  $.ajax(ajaxurl,{type:'POST',data:{action:'update_fs_connect_integration_setting',fs_box_state:fs_box_state}})});$(document).on('click','#flexible_shipping_rate_plugin .close-fs-rate-notice',function(){$('#flexible_shipping_rate_plugin .notice-dismiss').click()});$(document).on('click','#flexible_shipping_rate_plugin .fs-not-good',function(){$('#flexible_shipping_rate_plugin p').html(fs_admin.notice_not_good_enought)});$(document).on('click','.js--button-hints',function(){var label=$(this).text();var second_label=$(this).attr('data-second_label');$(this).toggleClass('open').text(second_label).attr('data-second_label',label);$('.js--hints').slideToggle()})});jQuery(function($){function fs_toggle_free_shipping_notice(){$('#woocommerce_flexible_shipping_method_free_shipping_cart_notice').closest('tr').toggle($('#woocommerce_flexible_shipping_method_free_shipping').val()!=='')}
9
+ $('#woocommerce_flexible_shipping_method_free_shipping').on('change',function(){fs_toggle_free_shipping_notice()});fs_toggle_free_shipping_notice()});jQuery(function($){let tax_status_field=$('#woocommerce_flexible_shipping_tax_status');function fs_toggle_prices_include_tax(){$('#woocommerce_flexible_shipping_prices_include_tax').closest('tr').toggle(tax_status_field.val()!=='none')}
10
+ tax_status_field.on('change',function(){fs_toggle_prices_include_tax()});fs_toggle_prices_include_tax()})
classes/class-flexible-shipping-plugin.php CHANGED
@@ -88,7 +88,7 @@ class Flexible_Shipping_Plugin extends AbstractPlugin implements HookableCollect
88
  *
89
  * @var string
90
  */
91
- private $scripts_version = '253';
92
 
93
  /**
94
  * Admin notices.
@@ -249,6 +249,8 @@ class Flexible_Shipping_Plugin extends AbstractPlugin implements HookableCollect
249
 
250
  $this->add_hookable( new MultipleShippingZonesMatchedSameTerritoryTracker() );
251
 
 
 
252
  $this->init_nps();
253
  }
254
 
88
  *
89
  * @var string
90
  */
91
+ private $scripts_version = '255';
92
 
93
  /**
94
  * Admin notices.
249
 
250
  $this->add_hookable( new MultipleShippingZonesMatchedSameTerritoryTracker() );
251
 
252
+ $this->add_hookable( new \WPDesk\FS\TableRate\Tax\Tracker() );
253
+
254
  $this->init_nps();
255
  }
256
 
classes/tracker/tracker.php CHANGED
@@ -79,6 +79,7 @@ class WPDesk_Flexible_Shipping_Tracker implements Hookable {
79
  $data['flexible_shipping']['cost_per_order_count'] = 0;
80
  $data['flexible_shipping']['stop_count'] = 0;
81
  $data['flexible_shipping']['cancel_count'] = 0;
 
82
  foreach ( $flexible_shipping_rates as $rate_id => $flexible_shipping_rate ) {
83
 
84
  $data['flexible_shipping']['total_shipping_methods'] ++;
@@ -142,6 +143,7 @@ class WPDesk_Flexible_Shipping_Tracker implements Hookable {
142
  if ( ! empty( $flexible_shipping_rate['method_default'] ) && 'no' !== $flexible_shipping_rate['method_default'] ) {
143
  $data['flexible_shipping']['default_count'] ++;
144
  }
 
145
 
146
  foreach ( $flexible_shipping_rate['method_rules'] as $method_rule ) {
147
  $rule_settings = new SingleRuleSettings( $method_rule );
79
  $data['flexible_shipping']['cost_per_order_count'] = 0;
80
  $data['flexible_shipping']['stop_count'] = 0;
81
  $data['flexible_shipping']['cancel_count'] = 0;
82
+
83
  foreach ( $flexible_shipping_rates as $rate_id => $flexible_shipping_rate ) {
84
 
85
  $data['flexible_shipping']['total_shipping_methods'] ++;
143
  if ( ! empty( $flexible_shipping_rate['method_default'] ) && 'no' !== $flexible_shipping_rate['method_default'] ) {
144
  $data['flexible_shipping']['default_count'] ++;
145
  }
146
+ $data['flexible_shipping'] = apply_filters( 'flexible-shipping/tracker/method-settings', $data['flexible_shipping'], $flexible_shipping_rate );
147
 
148
  foreach ( $flexible_shipping_rate['method_rules'] as $method_rule ) {
149
  $rule_settings = new SingleRuleSettings( $method_rule );
flexible-shipping.php CHANGED
@@ -3,7 +3,7 @@
3
  * Plugin Name: Flexible Shipping
4
  * Plugin URI: https://wordpress.org/plugins/flexible-shipping/
5
  * Description: Create additional shipment methods in WooCommerce and enable pricing based on cart weight or total.
6
- * Version: 4.7.2
7
  * Author: WP Desk
8
  * Author URI: https://flexibleshipping.com/?utm_source=fs&utm_medium=link&utm_campaign=plugin-list-author
9
  * Text Domain: flexible-shipping
@@ -11,7 +11,7 @@
11
  * Requires at least: 5.2
12
  * Tested up to: 5.9
13
  * WC requires at least: 5.2
14
- * WC tested up to: 5.6
15
  * Requires PHP: 7.0
16
  *
17
  * Copyright 2017 WP Desk Ltd.
@@ -38,7 +38,7 @@ if ( ! defined( 'ABSPATH' ) ) {
38
  } // Exit if accessed directly
39
 
40
  /* THIS VARIABLE CAN BE CHANGED AUTOMATICALLY */
41
- $plugin_version = '4.7.2';
42
 
43
  $plugin_name = 'Flexible Shipping';
44
  $product_id = 'Flexible Shipping';
3
  * Plugin Name: Flexible Shipping
4
  * Plugin URI: https://wordpress.org/plugins/flexible-shipping/
5
  * Description: Create additional shipment methods in WooCommerce and enable pricing based on cart weight or total.
6
+ * Version: 4.8.0
7
  * Author: WP Desk
8
  * Author URI: https://flexibleshipping.com/?utm_source=fs&utm_medium=link&utm_campaign=plugin-list-author
9
  * Text Domain: flexible-shipping
11
  * Requires at least: 5.2
12
  * Tested up to: 5.9
13
  * WC requires at least: 5.2
14
+ * WC tested up to: 5.7
15
  * Requires PHP: 7.0
16
  *
17
  * Copyright 2017 WP Desk Ltd.
38
  } // Exit if accessed directly
39
 
40
  /* THIS VARIABLE CAN BE CHANGED AUTOMATICALLY */
41
+ $plugin_version = '4.8.0';
42
 
43
  $plugin_name = 'Flexible Shipping';
44
  $product_id = 'Flexible Shipping';
lang/flexible-shipping.pot CHANGED
@@ -2,14 +2,14 @@
2
  # This file is distributed under the same license as the Flexible Shipping plugin.
3
  msgid ""
4
  msgstr ""
5
- "Project-Id-Version: Flexible Shipping 4.7.2\n"
6
  "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/flexible-shipping\n"
7
  "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
8
  "Language-Team: LANGUAGE <LL@li.org>\n"
9
  "MIME-Version: 1.0\n"
10
  "Content-Type: text/plain; charset=UTF-8\n"
11
  "Content-Transfer-Encoding: 8bit\n"
12
- "POT-Creation-Date: 2021-08-10T07:08:37+00:00\n"
13
  "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
14
  "X-Generator: WP-CLI 2.4.0\n"
15
  "X-Domain: flexible-shipping\n"
@@ -21,8 +21,8 @@ msgstr ""
21
  #: classes/table-rate/settings/flexible-shipping.php:18
22
  #: classes/table-rate/settings/flexible-shipping.php:33
23
  #: classes/table-rate/shipping-method.php:95
24
- #: src/WPDesk/FS/TableRate/ShippingMethod/CommonMethodSettings.php:151
25
- #: src/WPDesk/FS/TableRate/ShippingMethodSingle.php:61
26
  msgid "Flexible Shipping"
27
  msgstr ""
28
 
@@ -42,40 +42,40 @@ msgstr ""
42
  msgid "https://flexibleshipping.com/?utm_source=fs&utm_medium=link&utm_campaign=plugin-list-author"
43
  msgstr ""
44
 
45
- #: classes/class-flexible-shipping-plugin.php:281
46
  msgid "Hey, we are curious how would you grade your first impression on Flexible Shipping so far?"
47
  msgstr ""
48
 
49
- #: classes/class-flexible-shipping-plugin.php:282
50
  msgid "Wow, it's awesome!"
51
  msgstr ""
52
 
53
- #: classes/class-flexible-shipping-plugin.php:283
54
  msgid "Really poor"
55
  msgstr ""
56
 
57
- #: classes/class-flexible-shipping-plugin.php:286
58
  msgid "By using the 'Send feedback' button I hereby agree and consent to the terms of %1$sPrivacy Policy%2$s."
59
  msgstr ""
60
 
61
  #. Translators: link.
62
- #: classes/class-flexible-shipping-plugin.php:735
63
  msgid "How can We make Flexible Shipping better for you? %1$sJust write to us.%2$s"
64
  msgstr ""
65
 
66
- #: classes/class-flexible-shipping-plugin.php:816
67
  msgid "Settings"
68
  msgstr ""
69
 
70
- #: classes/class-flexible-shipping-plugin.php:820
71
  msgid "Docs"
72
  msgstr ""
73
 
74
- #: classes/class-flexible-shipping-plugin.php:821
75
  msgid "Support"
76
  msgstr ""
77
 
78
- #: classes/class-flexible-shipping-plugin.php:827
79
  msgid "Upgrade"
80
  msgstr ""
81
 
@@ -244,7 +244,7 @@ msgstr ""
244
 
245
  #: classes/table-rate/settings/flexible-shipping.php:24
246
  #: classes/table-rate/shipping-method.php:86
247
- #: src/WPDesk/FS/TableRate/ShippingMethod/CommonMethodSettings.php:50
248
  msgid "Enable/Disable"
249
  msgstr ""
250
 
@@ -261,22 +261,22 @@ msgid "Visible only to admin in WooCommerce settings."
261
  msgstr ""
262
 
263
  #: classes/table-rate/settings/flexible-shipping.php:37
264
- #: src/WPDesk/FS/TableRate/ShippingMethod/SingleMethodSettings.php:41
265
  msgid "Tax Status"
266
  msgstr ""
267
 
268
  #: classes/table-rate/settings/flexible-shipping.php:40
269
- #: src/WPDesk/FS/TableRate/ShippingMethod/SingleMethodSettings.php:48
270
  msgid "If you select to apply the tax, the plugin will use the tax rates defined in the WooCommerce settings at <strong>WooCommerce → Settings → Tax</strong>."
271
  msgstr ""
272
 
273
  #: classes/table-rate/settings/flexible-shipping.php:42
274
- #: src/WPDesk/FS/TableRate/ShippingMethod/SingleMethodSettings.php:45
275
  msgid "Taxable"
276
  msgstr ""
277
 
278
  #: classes/table-rate/settings/flexible-shipping.php:43
279
- #: src/WPDesk/FS/TableRate/ShippingMethod/SingleMethodSettings.php:46
280
  msgctxt "Tax status"
281
  msgid "None"
282
  msgstr ""
@@ -296,7 +296,7 @@ msgid "A group of Flexible Shipping methods - useful to organize numerous shippi
296
  msgstr ""
297
 
298
  #: classes/table-rate/shipping-method.php:88
299
- #: src/WPDesk/FS/TableRate/ShippingMethod/CommonMethodSettings.php:53
300
  msgid "Enable this shipment method"
301
  msgstr ""
302
 
@@ -305,7 +305,7 @@ msgid "Shipping Title"
305
  msgstr ""
306
 
307
  #: classes/table-rate/shipping-method.php:94
308
- #: src/WPDesk/FS/TableRate/ShippingMethod/CommonMethodSettings.php:58
309
  msgid "This controls the title which the user sees during checkout."
310
  msgstr ""
311
 
@@ -343,7 +343,7 @@ msgid "Shipping method %s updated."
343
  msgstr ""
344
 
345
  #: classes/table-rate/shipping-method.php:562
346
- #: src/WPDesk/FS/TableRate/ShippingMethodSingle.php:274
347
  msgid "Shipping cost added."
348
  msgstr ""
349
 
@@ -434,7 +434,7 @@ msgstr ""
434
 
435
  #: classes/table-rate/views/html-orders-filter-form.php:5
436
  #: classes/table-rate/views/html-shipping-method-settings.php:15
437
- #: src/WPDesk/FS/TableRate/ShippingMethod/CommonMethodSettings.php:172
438
  msgid "Integration"
439
  msgstr ""
440
 
@@ -453,12 +453,12 @@ msgid "Title"
453
  msgstr ""
454
 
455
  #: classes/table-rate/views/html-shipping-method-settings.php:13
456
- #: src/WPDesk/FS/TableRate/ShippingMethod/CommonMethodSettings.php:114
457
  msgid "Visibility"
458
  msgstr ""
459
 
460
  #: classes/table-rate/views/html-shipping-method-settings.php:14
461
- #: src/WPDesk/FS/TableRate/ShippingMethod/CommonMethodSettings.php:120
462
  msgid "Default"
463
  msgstr ""
464
 
@@ -481,7 +481,7 @@ msgid "yes"
481
  msgstr ""
482
 
483
  #: classes/table-rate/views/html-shipping-method-settings.php:46
484
- #: src/WPDesk/FS/TableRate/ShippingMethod/CommonMethodSettings.php:117
485
  msgid "Show only for logged in users"
486
  msgstr ""
487
 
@@ -535,7 +535,7 @@ msgid "More resources"
535
  msgstr ""
536
 
537
  #: classes/table-rate/views/html-shipping-settings-advanced.php:45
538
- #: src/WPDesk/FS/TableRate/ShippingMethod/CommonMethodSettings.php:187
539
  msgid "General Settings"
540
  msgstr ""
541
 
@@ -572,11 +572,11 @@ msgstr ""
572
  msgid "Enable integration with Flexible Shipping Connect"
573
  msgstr ""
574
 
575
- #: classes/tracker/tracker.php:198
576
  msgid "Opt-in"
577
  msgstr ""
578
 
579
- #: classes/tracker/tracker.php:201
580
  msgid "Opt-out"
581
  msgstr ""
582
 
@@ -728,8 +728,8 @@ msgid "Shipping configuration"
728
  msgstr ""
729
 
730
  #: src/WPDesk/FS/Info/WooCommerceABCPL.php:45
731
- #: src/WPDesk/FS/TableRate/ShippingMethod/CommonMethodSettings.php:71
732
- #: src/WPDesk/FS/TableRate/ShippingMethod/CommonMethodSettings.php:194
733
  msgid "Free Shipping"
734
  msgstr ""
735
 
@@ -1264,7 +1264,7 @@ msgid "Rule %1$s:"
1264
  msgstr ""
1265
 
1266
  #: src/WPDesk/FS/TableRate/Rule/SpecialAction/None.php:19
1267
- #: src/WPDesk/FS/TableRate/ShippingMethod/CommonMethodSettings.php:164
1268
  msgid "None"
1269
  msgstr ""
1270
 
@@ -1272,102 +1272,102 @@ msgstr ""
1272
  msgid "special action"
1273
  msgstr ""
1274
 
1275
- #: src/WPDesk/FS/TableRate/ShippingMethod/CommonMethodSettings.php:34
1276
  #: src/WPDesk/FS/TableRate/ShippingMethod/RateCalculator.php:354
1277
  msgid "Free"
1278
  msgstr ""
1279
 
1280
- #: src/WPDesk/FS/TableRate/ShippingMethod/CommonMethodSettings.php:56
1281
  msgid "Method Title"
1282
  msgstr ""
1283
 
1284
- #: src/WPDesk/FS/TableRate/ShippingMethod/CommonMethodSettings.php:64
1285
  msgid "Method Description"
1286
  msgstr ""
1287
 
1288
- #: src/WPDesk/FS/TableRate/ShippingMethod/CommonMethodSettings.php:66
1289
  msgid "This controls method description which the user sees during checkout."
1290
  msgstr ""
1291
 
1292
- #: src/WPDesk/FS/TableRate/ShippingMethod/CommonMethodSettings.php:74
1293
  msgid "Enter a minimum order amount for free shipment. This will override the costs configured below."
1294
  msgstr ""
1295
 
1296
- #: src/WPDesk/FS/TableRate/ShippingMethod/CommonMethodSettings.php:78
1297
  msgid "Free Shipping Label"
1298
  msgstr ""
1299
 
1300
- #: src/WPDesk/FS/TableRate/ShippingMethod/CommonMethodSettings.php:81
1301
  msgid "Enter the text for the additional shipping method's label which will be displayed once the free shipping is triggered or calculated."
1302
  msgstr ""
1303
 
1304
- #: src/WPDesk/FS/TableRate/ShippingMethod/CommonMethodSettings.php:85
1305
  msgid "'Left to free shipping' notice"
1306
  msgstr ""
1307
 
1308
- #: src/WPDesk/FS/TableRate/ShippingMethod/CommonMethodSettings.php:88
1309
  msgid "Display the notice with the amount of price left to free shipping"
1310
  msgstr ""
1311
 
1312
- #: src/WPDesk/FS/TableRate/ShippingMethod/CommonMethodSettings.php:89
1313
  msgid "Tick this option to display the notice in the cart and on the checkout page."
1314
  msgstr ""
1315
 
1316
  #. Translators: documentation link.
1317
- #: src/WPDesk/FS/TableRate/ShippingMethod/CommonMethodSettings.php:92
1318
  msgid "Learn %1$show to customize the displayed notice &rarr;%2$s"
1319
  msgstr ""
1320
 
1321
- #: src/WPDesk/FS/TableRate/ShippingMethod/CommonMethodSettings.php:95
1322
  msgid "Please mind that if you use any additional plugins to split the shipment into packages, the 'Left to free shipping notice' will not be displayed."
1323
  msgstr ""
1324
 
1325
- #: src/WPDesk/FS/TableRate/ShippingMethod/CommonMethodSettings.php:98
1326
  msgid "Rules Calculation"
1327
  msgstr ""
1328
 
1329
- #: src/WPDesk/FS/TableRate/ShippingMethod/CommonMethodSettings.php:100
1330
  msgid "Select how rules will be calculated. If you choose \"sum\" the rules order is important."
1331
  msgstr ""
1332
 
1333
- #: src/WPDesk/FS/TableRate/ShippingMethod/CommonMethodSettings.php:106
1334
  msgid "Cart Calculation"
1335
  msgstr ""
1336
 
1337
- #: src/WPDesk/FS/TableRate/ShippingMethod/CommonMethodSettings.php:110
1338
  msgid "Choose Package value to exclude virtual products from rules calculation."
1339
  msgstr ""
1340
 
1341
- #: src/WPDesk/FS/TableRate/ShippingMethod/CommonMethodSettings.php:123
1342
  msgid "Check the box to set this option as the default selected choice on the cart page."
1343
  msgstr ""
1344
 
1345
- #: src/WPDesk/FS/TableRate/ShippingMethod/CommonMethodSettings.php:126
1346
  msgid "FS Debug Mode"
1347
  msgstr ""
1348
 
1349
- #: src/WPDesk/FS/TableRate/ShippingMethod/CommonMethodSettings.php:129
1350
  msgid "Enable FS Debug Mode"
1351
  msgstr ""
1352
 
1353
  #. Translators: documentation link.
1354
- #: src/WPDesk/FS/TableRate/ShippingMethod/CommonMethodSettings.php:132
1355
  msgid "Enable FS debug mode to verify the shipping methods' configuration, check which one was used and how the shipping cost was calculated as well as identify any possible mistakes. %1$sLearn more how the Debug Mode works →%2$s"
1356
  msgstr ""
1357
 
1358
- #: src/WPDesk/FS/TableRate/ShippingMethod/CommonMethodSettings.php:148
1359
  msgid "Shipping Cost Calculation Rules"
1360
  msgstr ""
1361
 
1362
- #: src/WPDesk/FS/TableRate/ShippingMethod/CommonMethodSettings.php:168
1363
  msgid "Shipping Integration"
1364
  msgstr ""
1365
 
1366
- #: src/WPDesk/FS/TableRate/ShippingMethod/CommonMethodSettings.php:201
1367
  msgid "Cost Calculation"
1368
  msgstr ""
1369
 
1370
- #: src/WPDesk/FS/TableRate/ShippingMethod/CommonMethodSettings.php:208
1371
  msgid "Advanced Options"
1372
  msgstr ""
1373
 
@@ -1449,12 +1449,37 @@ msgstr ""
1449
  msgid "Shipping method title: %1$s"
1450
  msgstr ""
1451
 
1452
- #: src/WPDesk/FS/TableRate/ShippingMethodSingle.php:62
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1453
  msgid "A single Flexible Shipping method."
1454
  msgstr ""
1455
 
1456
  #. Translators: docs link.
1457
- #: src/WPDesk/FS/TableRate/ShippingMethodSingle.php:67
1458
  msgid "A single Flexible Shipping method. Learn %1$show to configure FS shipping method &rarr;%2$s"
1459
  msgstr ""
1460
 
2
  # This file is distributed under the same license as the Flexible Shipping plugin.
3
  msgid ""
4
  msgstr ""
5
+ "Project-Id-Version: Flexible Shipping 4.8.0\n"
6
  "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/flexible-shipping\n"
7
  "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
8
  "Language-Team: LANGUAGE <LL@li.org>\n"
9
  "MIME-Version: 1.0\n"
10
  "Content-Type: text/plain; charset=UTF-8\n"
11
  "Content-Transfer-Encoding: 8bit\n"
12
+ "POT-Creation-Date: 2021-08-23T14:25:01+00:00\n"
13
  "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
14
  "X-Generator: WP-CLI 2.4.0\n"
15
  "X-Domain: flexible-shipping\n"
21
  #: classes/table-rate/settings/flexible-shipping.php:18
22
  #: classes/table-rate/settings/flexible-shipping.php:33
23
  #: classes/table-rate/shipping-method.php:95
24
+ #: src/WPDesk/FS/TableRate/ShippingMethod/CommonMethodSettings.php:153
25
+ #: src/WPDesk/FS/TableRate/ShippingMethodSingle.php:62
26
  msgid "Flexible Shipping"
27
  msgstr ""
28
 
42
  msgid "https://flexibleshipping.com/?utm_source=fs&utm_medium=link&utm_campaign=plugin-list-author"
43
  msgstr ""
44
 
45
+ #: classes/class-flexible-shipping-plugin.php:283
46
  msgid "Hey, we are curious how would you grade your first impression on Flexible Shipping so far?"
47
  msgstr ""
48
 
49
+ #: classes/class-flexible-shipping-plugin.php:284
50
  msgid "Wow, it's awesome!"
51
  msgstr ""
52
 
53
+ #: classes/class-flexible-shipping-plugin.php:285
54
  msgid "Really poor"
55
  msgstr ""
56
 
57
+ #: classes/class-flexible-shipping-plugin.php:288
58
  msgid "By using the 'Send feedback' button I hereby agree and consent to the terms of %1$sPrivacy Policy%2$s."
59
  msgstr ""
60
 
61
  #. Translators: link.
62
+ #: classes/class-flexible-shipping-plugin.php:737
63
  msgid "How can We make Flexible Shipping better for you? %1$sJust write to us.%2$s"
64
  msgstr ""
65
 
66
+ #: classes/class-flexible-shipping-plugin.php:818
67
  msgid "Settings"
68
  msgstr ""
69
 
70
+ #: classes/class-flexible-shipping-plugin.php:822
71
  msgid "Docs"
72
  msgstr ""
73
 
74
+ #: classes/class-flexible-shipping-plugin.php:823
75
  msgid "Support"
76
  msgstr ""
77
 
78
+ #: classes/class-flexible-shipping-plugin.php:829
79
  msgid "Upgrade"
80
  msgstr ""
81
 
244
 
245
  #: classes/table-rate/settings/flexible-shipping.php:24
246
  #: classes/table-rate/shipping-method.php:86
247
+ #: src/WPDesk/FS/TableRate/ShippingMethod/CommonMethodSettings.php:52
248
  msgid "Enable/Disable"
249
  msgstr ""
250
 
261
  msgstr ""
262
 
263
  #: classes/table-rate/settings/flexible-shipping.php:37
264
+ #: src/WPDesk/FS/TableRate/ShippingMethod/SingleMethodSettings.php:55
265
  msgid "Tax Status"
266
  msgstr ""
267
 
268
  #: classes/table-rate/settings/flexible-shipping.php:40
269
+ #: src/WPDesk/FS/TableRate/ShippingMethod/SingleMethodSettings.php:62
270
  msgid "If you select to apply the tax, the plugin will use the tax rates defined in the WooCommerce settings at <strong>WooCommerce → Settings → Tax</strong>."
271
  msgstr ""
272
 
273
  #: classes/table-rate/settings/flexible-shipping.php:42
274
+ #: src/WPDesk/FS/TableRate/ShippingMethod/SingleMethodSettings.php:59
275
  msgid "Taxable"
276
  msgstr ""
277
 
278
  #: classes/table-rate/settings/flexible-shipping.php:43
279
+ #: src/WPDesk/FS/TableRate/ShippingMethod/SingleMethodSettings.php:60
280
  msgctxt "Tax status"
281
  msgid "None"
282
  msgstr ""
296
  msgstr ""
297
 
298
  #: classes/table-rate/shipping-method.php:88
299
+ #: src/WPDesk/FS/TableRate/ShippingMethod/CommonMethodSettings.php:55
300
  msgid "Enable this shipment method"
301
  msgstr ""
302
 
305
  msgstr ""
306
 
307
  #: classes/table-rate/shipping-method.php:94
308
+ #: src/WPDesk/FS/TableRate/ShippingMethod/CommonMethodSettings.php:60
309
  msgid "This controls the title which the user sees during checkout."
310
  msgstr ""
311
 
343
  msgstr ""
344
 
345
  #: classes/table-rate/shipping-method.php:562
346
+ #: src/WPDesk/FS/TableRate/ShippingMethodSingle.php:276
347
  msgid "Shipping cost added."
348
  msgstr ""
349
 
434
 
435
  #: classes/table-rate/views/html-orders-filter-form.php:5
436
  #: classes/table-rate/views/html-shipping-method-settings.php:15
437
+ #: src/WPDesk/FS/TableRate/ShippingMethod/CommonMethodSettings.php:174
438
  msgid "Integration"
439
  msgstr ""
440
 
453
  msgstr ""
454
 
455
  #: classes/table-rate/views/html-shipping-method-settings.php:13
456
+ #: src/WPDesk/FS/TableRate/ShippingMethod/CommonMethodSettings.php:116
457
  msgid "Visibility"
458
  msgstr ""
459
 
460
  #: classes/table-rate/views/html-shipping-method-settings.php:14
461
+ #: src/WPDesk/FS/TableRate/ShippingMethod/CommonMethodSettings.php:122
462
  msgid "Default"
463
  msgstr ""
464
 
481
  msgstr ""
482
 
483
  #: classes/table-rate/views/html-shipping-method-settings.php:46
484
+ #: src/WPDesk/FS/TableRate/ShippingMethod/CommonMethodSettings.php:119
485
  msgid "Show only for logged in users"
486
  msgstr ""
487
 
535
  msgstr ""
536
 
537
  #: classes/table-rate/views/html-shipping-settings-advanced.php:45
538
+ #: src/WPDesk/FS/TableRate/ShippingMethod/CommonMethodSettings.php:189
539
  msgid "General Settings"
540
  msgstr ""
541
 
572
  msgid "Enable integration with Flexible Shipping Connect"
573
  msgstr ""
574
 
575
+ #: classes/tracker/tracker.php:200
576
  msgid "Opt-in"
577
  msgstr ""
578
 
579
+ #: classes/tracker/tracker.php:203
580
  msgid "Opt-out"
581
  msgstr ""
582
 
728
  msgstr ""
729
 
730
  #: src/WPDesk/FS/Info/WooCommerceABCPL.php:45
731
+ #: src/WPDesk/FS/TableRate/ShippingMethod/CommonMethodSettings.php:73
732
+ #: src/WPDesk/FS/TableRate/ShippingMethod/CommonMethodSettings.php:196
733
  msgid "Free Shipping"
734
  msgstr ""
735
 
1264
  msgstr ""
1265
 
1266
  #: src/WPDesk/FS/TableRate/Rule/SpecialAction/None.php:19
1267
+ #: src/WPDesk/FS/TableRate/ShippingMethod/CommonMethodSettings.php:166
1268
  msgid "None"
1269
  msgstr ""
1270
 
1272
  msgid "special action"
1273
  msgstr ""
1274
 
1275
+ #: src/WPDesk/FS/TableRate/ShippingMethod/CommonMethodSettings.php:36
1276
  #: src/WPDesk/FS/TableRate/ShippingMethod/RateCalculator.php:354
1277
  msgid "Free"
1278
  msgstr ""
1279
 
1280
+ #: src/WPDesk/FS/TableRate/ShippingMethod/CommonMethodSettings.php:58
1281
  msgid "Method Title"
1282
  msgstr ""
1283
 
1284
+ #: src/WPDesk/FS/TableRate/ShippingMethod/CommonMethodSettings.php:66
1285
  msgid "Method Description"
1286
  msgstr ""
1287
 
1288
+ #: src/WPDesk/FS/TableRate/ShippingMethod/CommonMethodSettings.php:68
1289
  msgid "This controls method description which the user sees during checkout."
1290
  msgstr ""
1291
 
1292
+ #: src/WPDesk/FS/TableRate/ShippingMethod/CommonMethodSettings.php:76
1293
  msgid "Enter a minimum order amount for free shipment. This will override the costs configured below."
1294
  msgstr ""
1295
 
1296
+ #: src/WPDesk/FS/TableRate/ShippingMethod/CommonMethodSettings.php:80
1297
  msgid "Free Shipping Label"
1298
  msgstr ""
1299
 
1300
+ #: src/WPDesk/FS/TableRate/ShippingMethod/CommonMethodSettings.php:83
1301
  msgid "Enter the text for the additional shipping method's label which will be displayed once the free shipping is triggered or calculated."
1302
  msgstr ""
1303
 
1304
+ #: src/WPDesk/FS/TableRate/ShippingMethod/CommonMethodSettings.php:87
1305
  msgid "'Left to free shipping' notice"
1306
  msgstr ""
1307
 
1308
+ #: src/WPDesk/FS/TableRate/ShippingMethod/CommonMethodSettings.php:90
1309
  msgid "Display the notice with the amount of price left to free shipping"
1310
  msgstr ""
1311
 
1312
+ #: src/WPDesk/FS/TableRate/ShippingMethod/CommonMethodSettings.php:91
1313
  msgid "Tick this option to display the notice in the cart and on the checkout page."
1314
  msgstr ""
1315
 
1316
  #. Translators: documentation link.
1317
+ #: src/WPDesk/FS/TableRate/ShippingMethod/CommonMethodSettings.php:94
1318
  msgid "Learn %1$show to customize the displayed notice &rarr;%2$s"
1319
  msgstr ""
1320
 
1321
+ #: src/WPDesk/FS/TableRate/ShippingMethod/CommonMethodSettings.php:97
1322
  msgid "Please mind that if you use any additional plugins to split the shipment into packages, the 'Left to free shipping notice' will not be displayed."
1323
  msgstr ""
1324
 
1325
+ #: src/WPDesk/FS/TableRate/ShippingMethod/CommonMethodSettings.php:100
1326
  msgid "Rules Calculation"
1327
  msgstr ""
1328
 
1329
+ #: src/WPDesk/FS/TableRate/ShippingMethod/CommonMethodSettings.php:102
1330
  msgid "Select how rules will be calculated. If you choose \"sum\" the rules order is important."
1331
  msgstr ""
1332
 
1333
+ #: src/WPDesk/FS/TableRate/ShippingMethod/CommonMethodSettings.php:108
1334
  msgid "Cart Calculation"
1335
  msgstr ""
1336
 
1337
+ #: src/WPDesk/FS/TableRate/ShippingMethod/CommonMethodSettings.php:112
1338
  msgid "Choose Package value to exclude virtual products from rules calculation."
1339
  msgstr ""
1340
 
1341
+ #: src/WPDesk/FS/TableRate/ShippingMethod/CommonMethodSettings.php:125
1342
  msgid "Check the box to set this option as the default selected choice on the cart page."
1343
  msgstr ""
1344
 
1345
+ #: src/WPDesk/FS/TableRate/ShippingMethod/CommonMethodSettings.php:128
1346
  msgid "FS Debug Mode"
1347
  msgstr ""
1348
 
1349
+ #: src/WPDesk/FS/TableRate/ShippingMethod/CommonMethodSettings.php:131
1350
  msgid "Enable FS Debug Mode"
1351
  msgstr ""
1352
 
1353
  #. Translators: documentation link.
1354
+ #: src/WPDesk/FS/TableRate/ShippingMethod/CommonMethodSettings.php:134
1355
  msgid "Enable FS debug mode to verify the shipping methods' configuration, check which one was used and how the shipping cost was calculated as well as identify any possible mistakes. %1$sLearn more how the Debug Mode works →%2$s"
1356
  msgstr ""
1357
 
1358
+ #: src/WPDesk/FS/TableRate/ShippingMethod/CommonMethodSettings.php:150
1359
  msgid "Shipping Cost Calculation Rules"
1360
  msgstr ""
1361
 
1362
+ #: src/WPDesk/FS/TableRate/ShippingMethod/CommonMethodSettings.php:170
1363
  msgid "Shipping Integration"
1364
  msgstr ""
1365
 
1366
+ #: src/WPDesk/FS/TableRate/ShippingMethod/CommonMethodSettings.php:203
1367
  msgid "Cost Calculation"
1368
  msgstr ""
1369
 
1370
+ #: src/WPDesk/FS/TableRate/ShippingMethod/CommonMethodSettings.php:210
1371
  msgid "Advanced Options"
1372
  msgstr ""
1373
 
1449
  msgid "Shipping method title: %1$s"
1450
  msgstr ""
1451
 
1452
+ #: src/WPDesk/FS/TableRate/ShippingMethod/SingleMethodSettings.php:44
1453
+ msgid "Tax"
1454
+ msgstr ""
1455
+
1456
+ #. Translators: new line and link.
1457
+ #: src/WPDesk/FS/TableRate/ShippingMethod/SingleMethodSettings.php:48
1458
+ msgid "Adjust shipping taxes for this shipping method. Determine its tax status and whether you want to enter shipping costs with or without taxes.%1$sNeed more information? Read our %2$scomprehensive guide about WooCommerce shipping taxes →%3$s"
1459
+ msgstr ""
1460
+
1461
+ #: src/WPDesk/FS/TableRate/ShippingMethod/SingleMethodSettings.php:65
1462
+ msgid "Tax included in shipping cost"
1463
+ msgstr ""
1464
+
1465
+ #: src/WPDesk/FS/TableRate/ShippingMethod/SingleMethodSettings.php:69
1466
+ msgid "Yes, I will enter the shipping cost inclusive of tax"
1467
+ msgstr ""
1468
+
1469
+ #: src/WPDesk/FS/TableRate/ShippingMethod/SingleMethodSettings.php:70
1470
+ msgid "No, I will enter the shipping cost exclusive of tax"
1471
+ msgstr ""
1472
+
1473
+ #: src/WPDesk/FS/TableRate/ShippingMethod/SingleMethodSettings.php:72
1474
+ msgid "Choose whether the shipping cost defined in the rules table should be inclusive or exclusive of tax."
1475
+ msgstr ""
1476
+
1477
+ #: src/WPDesk/FS/TableRate/ShippingMethodSingle.php:63
1478
  msgid "A single Flexible Shipping method."
1479
  msgstr ""
1480
 
1481
  #. Translators: docs link.
1482
+ #: src/WPDesk/FS/TableRate/ShippingMethodSingle.php:68
1483
  msgid "A single Flexible Shipping method. Learn %1$show to configure FS shipping method &rarr;%2$s"
1484
  msgstr ""
1485
 
readme.txt CHANGED
@@ -4,7 +4,7 @@ Donate link: https://flexibleshipping.com/products/flexible-shipping-pro-woocomm
4
  Tags: table rate, table rate shipping, conditional shipping, shipping method, woocommerce shipping, flexible shipping, woocommerce table rate shipping, cart based shipping, weight shipping, weight based shipping, totals based shipping, order based shipping, shipping zones, shipping classes, shipping, free shipping, advanced shipping
5
  Requires at least: 4.5
6
  Tested up to: 5.9
7
- Stable tag: 4.7.2
8
  Requires PHP: 7.0
9
  License: GPLv3 or later
10
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
@@ -60,6 +60,7 @@ These are only a few examples of the Flexible Shipping usage, however, its possi
60
  * Shipping cost based on the volume of the products in the cart
61
  * Shipping cost based on dimensional weight (with custom DIM Factor)
62
  * Shipping cost based on products (products, product categories, product tags)
 
63
  * Enable/disable shipping method based on the Time of the Day and Day of the week
64
  * Additional costs for price, weight, item, cart line item
65
  * Stopping a rule (if the rule is matched the following rules will not be calculated)
@@ -199,6 +200,9 @@ If you are upgrading from the old Flexible Shipping version (1.3.2, woo-flexible
199
 
200
  == Changelog ==
201
 
 
 
 
202
  = 4.7.2 - 2021-08-10 =
203
  * Fixed fatal error on subscription renewal in InPost integration
204
  * Changed text above table rule
4
  Tags: table rate, table rate shipping, conditional shipping, shipping method, woocommerce shipping, flexible shipping, woocommerce table rate shipping, cart based shipping, weight shipping, weight based shipping, totals based shipping, order based shipping, shipping zones, shipping classes, shipping, free shipping, advanced shipping
5
  Requires at least: 4.5
6
  Tested up to: 5.9
7
+ Stable tag: 4.8.0
8
  Requires PHP: 7.0
9
  License: GPLv3 or later
10
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
60
  * Shipping cost based on the volume of the products in the cart
61
  * Shipping cost based on dimensional weight (with custom DIM Factor)
62
  * Shipping cost based on products (products, product categories, product tags)
63
+ * Shipping cost based on user role
64
  * Enable/disable shipping method based on the Time of the Day and Day of the week
65
  * Additional costs for price, weight, item, cart line item
66
  * Stopping a rule (if the rule is matched the following rules will not be calculated)
200
 
201
  == Changelog ==
202
 
203
+ = 4.8.0 - 2021-08-23 =
204
+ * Added ability to choose a shipping cost with or without tax
205
+
206
  = 4.7.2 - 2021-08-10 =
207
  * Fixed fatal error on subscription renewal in InPost integration
208
  * Changed text above table rule
src/WPDesk/FS/TableRate/ContextualInfo/Creator.php CHANGED
@@ -44,42 +44,42 @@ class Creator implements HookableCollection {
44
  * Create contextual info.
45
  */
46
  public function create_contextual_info() {
47
- $other_phrases_not_in = array();
48
 
49
  $phrases_in = $this->get_dhl_express_phrases();
50
  $this->create_dhl_express_contextual_info( $phrases_in );
51
  $other_phrases_not_in = $this->merge_phrases( $other_phrases_not_in, $phrases_in );
52
 
53
- $phrases_in = array( 'fedex' );
54
  $this->create_fedex_contextual_info( $phrases_in );
55
  $other_phrases_not_in = $this->merge_phrases( $other_phrases_not_in, $phrases_in );
56
 
57
- $phrases_in = array( 'ups' );
58
  $this->create_ups_contextual_info( $phrases_in );
59
  $other_phrases_not_in = $this->merge_phrases( $other_phrases_not_in, $phrases_in );
60
 
61
  if ( $this->is_base_location_country_pl() ) {
62
- $phrases_in = array( 'dpd' );
63
  $this->create_dpd_contextual_info( $phrases_in );
64
  $other_phrases_not_in = $this->merge_phrases( $other_phrases_not_in, $phrases_in );
65
 
66
- $phrases_in = array( 'List', 'poczta polska', 'pocztex', 'polecony', 'poczt' );
67
  $this->create_enadawca_contextual_info( $phrases_in );
68
  $other_phrases_not_in = $this->merge_phrases( $other_phrases_not_in, $phrases_in );
69
 
70
- $phrases_in = array( 'dhl', 'parcel' );
71
  $this->create_dhl_contextual_info( $phrases_in );
72
  $other_phrases_not_in = $this->merge_phrases( $other_phrases_not_in, $phrases_in );
73
 
74
- $phrases_in = array( 'ruch', 'kiosk' );
75
  $this->create_pwr_contextual_info( $phrases_in );
76
  $other_phrases_not_in = $this->merge_phrases( $other_phrases_not_in, $phrases_in );
77
 
78
- $phrases_in = array( 'paczkomat', 'paczka w weekend', 'inpost' );
79
  $this->create_inpost_contextual_info( $phrases_in );
80
  $other_phrases_not_in = $this->merge_phrases( $other_phrases_not_in, $phrases_in );
81
  } elseif ( $this->is_base_location_country_gb() ) {
82
- $phrases_in = array( 'air', 'dpd' );
83
  $this->create_dpd_uk_contextual_info( $phrases_in );
84
  $other_phrases_not_in = $this->merge_phrases( $other_phrases_not_in, $phrases_in );
85
  }
@@ -92,9 +92,9 @@ class Creator implements HookableCollection {
92
  */
93
  private function get_dhl_express_phrases() {
94
  if ( $this->is_base_location_country_pl() ) {
95
- return array( 'dhl express' );
96
  } else {
97
- return array( 'dhl', 'dhl express' );
98
  }
99
  }
100
 
@@ -327,7 +327,7 @@ class Creator implements HookableCollection {
327
  new \Flexible_Shipping_Contextual_Info(
328
  self::METHOD_TITLE_ELEMENT,
329
  'other',
330
- array(),
331
  $this->create_html_for_default_contextual_info(),
332
  $phrases_not_in
333
  )
44
  * Create contextual info.
45
  */
46
  public function create_contextual_info() {
47
+ $other_phrases_not_in = [];
48
 
49
  $phrases_in = $this->get_dhl_express_phrases();
50
  $this->create_dhl_express_contextual_info( $phrases_in );
51
  $other_phrases_not_in = $this->merge_phrases( $other_phrases_not_in, $phrases_in );
52
 
53
+ $phrases_in = [ 'fedex' ];
54
  $this->create_fedex_contextual_info( $phrases_in );
55
  $other_phrases_not_in = $this->merge_phrases( $other_phrases_not_in, $phrases_in );
56
 
57
+ $phrases_in = [ 'ups' ];
58
  $this->create_ups_contextual_info( $phrases_in );
59
  $other_phrases_not_in = $this->merge_phrases( $other_phrases_not_in, $phrases_in );
60
 
61
  if ( $this->is_base_location_country_pl() ) {
62
+ $phrases_in = [ 'dpd' ];
63
  $this->create_dpd_contextual_info( $phrases_in );
64
  $other_phrases_not_in = $this->merge_phrases( $other_phrases_not_in, $phrases_in );
65
 
66
+ $phrases_in = [ 'List', 'poczta polska', 'pocztex', 'polecony', 'poczt' ];
67
  $this->create_enadawca_contextual_info( $phrases_in );
68
  $other_phrases_not_in = $this->merge_phrases( $other_phrases_not_in, $phrases_in );
69
 
70
+ $phrases_in = [ 'dhl', 'parcel' ];
71
  $this->create_dhl_contextual_info( $phrases_in );
72
  $other_phrases_not_in = $this->merge_phrases( $other_phrases_not_in, $phrases_in );
73
 
74
+ $phrases_in = [ 'ruch', 'kiosk' ];
75
  $this->create_pwr_contextual_info( $phrases_in );
76
  $other_phrases_not_in = $this->merge_phrases( $other_phrases_not_in, $phrases_in );
77
 
78
+ $phrases_in = [ 'paczkomat', 'paczka w weekend', 'inpost' ];
79
  $this->create_inpost_contextual_info( $phrases_in );
80
  $other_phrases_not_in = $this->merge_phrases( $other_phrases_not_in, $phrases_in );
81
  } elseif ( $this->is_base_location_country_gb() ) {
82
+ $phrases_in = [ 'air', 'dpd' ];
83
  $this->create_dpd_uk_contextual_info( $phrases_in );
84
  $other_phrases_not_in = $this->merge_phrases( $other_phrases_not_in, $phrases_in );
85
  }
92
  */
93
  private function get_dhl_express_phrases() {
94
  if ( $this->is_base_location_country_pl() ) {
95
+ return [ 'dhl express' ];
96
  } else {
97
+ return [ 'dhl', 'dhl express' ];
98
  }
99
  }
100
 
327
  new \Flexible_Shipping_Contextual_Info(
328
  self::METHOD_TITLE_ELEMENT,
329
  'other',
330
+ [],
331
  $this->create_html_for_default_contextual_info(),
332
  $phrases_not_in
333
  )
src/WPDesk/FS/TableRate/Rule/CostsCalculator.php CHANGED
@@ -7,11 +7,11 @@
7
 
8
  namespace WPDesk\FS\TableRate\Rule;
9
 
 
10
  use FSVendor\WPDesk\FS\TableRate\Logger\ArrayLogger;
11
  use FSVendor\WPDesk\FS\TableRate\Settings\MethodSettings;
12
  use Psr\Log\LoggerInterface;
13
  use WC_Cart;
14
- use WPDesk\FS\TableRate\Field;
15
  use WPDesk\FS\TableRate\Rule;
16
  use WPDesk\FS\TableRate\Rule\Condition\Weight;
17
  use WPDesk\FS\TableRate\Rule\Condition\ConditionsFactory;
@@ -34,7 +34,7 @@ class CostsCalculator {
34
  /**
35
  * @var Rule\Rule[]
36
  */
37
- private $prepared_rules = array();
38
 
39
  /**
40
  * @var float
@@ -134,7 +134,7 @@ class CostsCalculator {
134
  * @return Rule\Rule[]
135
  */
136
  private function prepare_rules() {
137
- $prepared_rules = array();
138
  foreach ( $this->get_rules_settings() as $rule_settings ) {
139
  $prepared_rules[] = new Rule\Rule(
140
  $rule_settings,
@@ -190,7 +190,7 @@ class CostsCalculator {
190
  */
191
  $calculation_method_callback = apply_filters(
192
  'flexible-shipping/shipping-method/rules-calculation-function',
193
- array( $this, 'sum_calculation' ),
194
  $this->method_settings->get_calculation_method()
195
  );
196
 
7
 
8
  namespace WPDesk\FS\TableRate\Rule;
9
 
10
+ use FSVendor\WPDesk\Forms\Field;
11
  use FSVendor\WPDesk\FS\TableRate\Logger\ArrayLogger;
12
  use FSVendor\WPDesk\FS\TableRate\Settings\MethodSettings;
13
  use Psr\Log\LoggerInterface;
14
  use WC_Cart;
 
15
  use WPDesk\FS\TableRate\Rule;
16
  use WPDesk\FS\TableRate\Rule\Condition\Weight;
17
  use WPDesk\FS\TableRate\Rule\Condition\ConditionsFactory;
34
  /**
35
  * @var Rule\Rule[]
36
  */
37
+ private $prepared_rules = [];
38
 
39
  /**
40
  * @var float
134
  * @return Rule\Rule[]
135
  */
136
  private function prepare_rules() {
137
+ $prepared_rules = [];
138
  foreach ( $this->get_rules_settings() as $rule_settings ) {
139
  $prepared_rules[] = new Rule\Rule(
140
  $rule_settings,
190
  */
191
  $calculation_method_callback = apply_filters(
192
  'flexible-shipping/shipping-method/rules-calculation-function',
193
+ [ $this, 'sum_calculation' ],
194
  $this->method_settings->get_calculation_method()
195
  );
196
 
src/WPDesk/FS/TableRate/ShippingMethod/CommonMethodSettings.php CHANGED
@@ -18,10 +18,12 @@ use WPDesk_Flexible_Shipping;
18
  */
19
  class CommonMethodSettings implements MethodSettings {
20
 
21
- const METHOD_TITLE = 'method_title';
22
- const METHOD_DESCRIPTION = 'method_description';
23
- const METHOD_RULES = 'method_rules';
24
- const CART_CALCULATION = 'cart_calculation';
 
 
25
 
26
  /**
27
  * @param array $method_settings .
@@ -94,11 +96,11 @@ class CommonMethodSettings implements MethodSettings {
94
  '</a>'
95
  ) . '<br /><br />' . __( 'Please mind that if you use any additional plugins to split the shipment into packages, the \'Left to free shipping notice\' will not be displayed.', 'flexible-shipping' ),
96
  ],
97
- 'method_calculation_method' => [
98
  'title' => __( 'Rules Calculation', 'flexible-shipping' ),
99
  'type' => 'select',
100
  'description' => __( 'Select how rules will be calculated. If you choose "sum" the rules order is important.', 'flexible-shipping' ),
101
- 'default' => $this->get_value_from_settings( $method_settings, 'method_calculation_method', '' ),
102
  'desc_tip' => true,
103
  'options' => ( new CalculationMethodOptions() )->get_options(),
104
  ],
@@ -196,7 +198,7 @@ class CommonMethodSettings implements MethodSettings {
196
  ];
197
  }
198
 
199
- if ( 'method_max_cost' === $settings_key || ( 'method_calculation_method' === $settings_key && ! isset( $settings['method_max_cost'] ) ) ) {
200
  $settings['title_cost_calculation'] = [
201
  'title' => __( 'Cost Calculation', 'flexible-shipping' ),
202
  'type' => 'title',
18
  */
19
  class CommonMethodSettings implements MethodSettings {
20
 
21
+ const METHOD_TITLE = 'method_title';
22
+ const METHOD_DESCRIPTION = 'method_description';
23
+ const METHOD_RULES = 'method_rules';
24
+ const CART_CALCULATION = 'cart_calculation';
25
+
26
+ const SETTING_METHOD_CALCULATION_METHOD = 'method_calculation_method';
27
 
28
  /**
29
  * @param array $method_settings .
96
  '</a>'
97
  ) . '<br /><br />' . __( 'Please mind that if you use any additional plugins to split the shipment into packages, the \'Left to free shipping notice\' will not be displayed.', 'flexible-shipping' ),
98
  ],
99
+ self::SETTING_METHOD_CALCULATION_METHOD => [
100
  'title' => __( 'Rules Calculation', 'flexible-shipping' ),
101
  'type' => 'select',
102
  'description' => __( 'Select how rules will be calculated. If you choose "sum" the rules order is important.', 'flexible-shipping' ),
103
+ 'default' => $this->get_value_from_settings( $method_settings, self::SETTING_METHOD_CALCULATION_METHOD, '' ),
104
  'desc_tip' => true,
105
  'options' => ( new CalculationMethodOptions() )->get_options(),
106
  ],
198
  ];
199
  }
200
 
201
+ if ( 'method_max_cost' === $settings_key || ( self::SETTING_METHOD_CALCULATION_METHOD === $settings_key && ! isset( $settings['method_max_cost'] ) ) ) {
202
  $settings['title_cost_calculation'] = [
203
  'title' => __( 'Cost Calculation', 'flexible-shipping' ),
204
  'type' => 'title',
src/WPDesk/FS/TableRate/ShippingMethod/SingleMethodSettings.php CHANGED
@@ -19,7 +19,7 @@ class SingleMethodSettings implements MethodSettings {
19
  * @return array
20
  */
21
  public function get_settings_fields( array $method_settings, $with_integration_settings ) {
22
- $settings_fields = $this->append_taxable_settings(
23
  ( new CommonMethodSettings() )->get_settings_fields( $method_settings, $with_integration_settings )
24
  );
25
  unset( $settings_fields['method_enabled'] );
@@ -32,21 +32,45 @@ class SingleMethodSettings implements MethodSettings {
32
  *
33
  * @return array
34
  */
35
- private function append_taxable_settings( array $settings_fields ) {
36
- $new_settings_fields = array();
 
 
 
37
  foreach ( $settings_fields as $key => $settings_field ) {
38
  $new_settings_fields[ $key ] = $settings_field;
39
  if ( CommonMethodSettings::METHOD_DESCRIPTION === $key ) {
40
- $new_settings_fields['tax_status'] = array(
 
 
 
 
 
 
 
 
 
 
 
41
  'title' => __( 'Tax Status', 'flexible-shipping' ),
42
  'type' => 'select',
43
  'default' => 'taxable',
44
- 'options' => array(
45
  'taxable' => __( 'Taxable', 'flexible-shipping' ),
46
  'none' => _x( 'None', 'Tax status', 'flexible-shipping' ),
47
- ),
48
  'desc_tip' => __( 'If you select to apply the tax, the plugin will use the tax rates defined in the WooCommerce settings at <strong>WooCommerce → Settings → Tax</strong>.', 'flexible-shipping' ),
49
- );
 
 
 
 
 
 
 
 
 
 
50
  }
51
  }
52
 
19
  * @return array
20
  */
21
  public function get_settings_fields( array $method_settings, $with_integration_settings ) {
22
+ $settings_fields = $this->append_tax_settings(
23
  ( new CommonMethodSettings() )->get_settings_fields( $method_settings, $with_integration_settings )
24
  );
25
  unset( $settings_fields['method_enabled'] );
32
  *
33
  * @return array
34
  */
35
+ private function append_tax_settings( array $settings_fields ) {
36
+ $tax_docs_link = 'pl_PL' !== get_locale()
37
+ ? 'https://flexibleshipping.com/woocommerce-shipping-tax/?utm_source=taxes&utm_medium=link&utm_campaign=flexible-shipping-method'
38
+ : 'https://wpde.sk/podatek-wysylka';
39
+ $new_settings_fields = [];
40
  foreach ( $settings_fields as $key => $settings_field ) {
41
  $new_settings_fields[ $key ] = $settings_field;
42
  if ( CommonMethodSettings::METHOD_DESCRIPTION === $key ) {
43
+ $new_settings_fields['tax_heading'] = [
44
+ 'title' => __( 'Tax', 'flexible-shipping' ),
45
+ 'type' => 'title',
46
+ 'description' => sprintf(
47
+ // Translators: new line and link.
48
+ __( 'Adjust shipping taxes for this shipping method. Determine its tax status and whether you want to enter shipping costs with or without taxes.%1$sNeed more information? Read our %2$scomprehensive guide about WooCommerce shipping taxes →%3$s', 'flexible-shipping' ),
49
+ '<br/>',
50
+ '<a target="_blank" href="' . $tax_docs_link . '">',
51
+ '</a>'
52
+ ),
53
+ ];
54
+ $new_settings_fields['tax_status'] = [
55
  'title' => __( 'Tax Status', 'flexible-shipping' ),
56
  'type' => 'select',
57
  'default' => 'taxable',
58
+ 'options' => [
59
  'taxable' => __( 'Taxable', 'flexible-shipping' ),
60
  'none' => _x( 'None', 'Tax status', 'flexible-shipping' ),
61
+ ],
62
  'desc_tip' => __( 'If you select to apply the tax, the plugin will use the tax rates defined in the WooCommerce settings at <strong>WooCommerce → Settings → Tax</strong>.', 'flexible-shipping' ),
63
+ ];
64
+ $new_settings_fields['prices_include_tax'] = [
65
+ 'title' => __( 'Tax included in shipping cost', 'flexible-shipping' ),
66
+ 'type' => 'select',
67
+ 'default' => 'no',
68
+ 'options' => [
69
+ 'yes' => __( 'Yes, I will enter the shipping cost inclusive of tax', 'flexible-shipping' ),
70
+ 'no' => __( 'No, I will enter the shipping cost exclusive of tax', 'flexible-shipping' ),
71
+ ],
72
+ 'desc_tip' => __( 'Choose whether the shipping cost defined in the rules table should be inclusive or exclusive of tax.', 'flexible-shipping' ),
73
+ ];
74
  }
75
  }
76
 
src/WPDesk/FS/TableRate/ShippingMethodSingle.php CHANGED
@@ -17,6 +17,7 @@ use WPDesk\FS\TableRate\Rule\Cost\RuleAdditionalCostFactory;
17
  use WPDesk\FS\TableRate\Rule\Cost\RuleCostFieldsFactory;
18
  use WPDesk\FS\TableRate\ShippingMethod\RateCalculatorFactory;
19
  use WPDesk\FS\TableRate\ShippingMethod\SingleMethodSettings;
 
20
  use WPDesk_Flexible_Shipping;
21
 
22
  /**
@@ -270,6 +271,7 @@ class ShippingMethodSingle extends WC_Shipping_Method {
270
  $calculated_rate = $rate_calculator->calculate_rate( $method_settings, $this->get_rate_id(), is_user_logged_in() );
271
 
272
  if ( ! empty( $calculated_rate ) && $this->should_add_rate( $calculated_rate ) ) {
 
273
  $this->add_rate( $calculated_rate );
274
  $logger->debug( __( 'Shipping cost added.', 'flexible-shipping' ), $logger->get_results_context() );
275
  }
17
  use WPDesk\FS\TableRate\Rule\Cost\RuleCostFieldsFactory;
18
  use WPDesk\FS\TableRate\ShippingMethod\RateCalculatorFactory;
19
  use WPDesk\FS\TableRate\ShippingMethod\SingleMethodSettings;
20
+ use WPDesk\FS\TableRate\Tax\TaxCalculator;
21
  use WPDesk_Flexible_Shipping;
22
 
23
  /**
271
  $calculated_rate = $rate_calculator->calculate_rate( $method_settings, $this->get_rate_id(), is_user_logged_in() );
272
 
273
  if ( ! empty( $calculated_rate ) && $this->should_add_rate( $calculated_rate ) ) {
274
+ $calculated_rate = ( new TaxCalculator( $method_settings, \WC_Tax::get_shipping_tax_rates() ) )->append_taxes_to_rate_if_enabled( $calculated_rate, WC()->cart->get_customer()->get_is_vat_exempt() );
275
  $this->add_rate( $calculated_rate );
276
  $logger->debug( __( 'Shipping cost added.', 'flexible-shipping' ), $logger->get_results_context() );
277
  }
src/WPDesk/FS/TableRate/Tax/TaxCalculator.php ADDED
@@ -0,0 +1,70 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Class TaxCalculator
4
+ *
5
+ * @package WPDesk\FS\TableRate\Tax
6
+ */
7
+
8
+ namespace WPDesk\FS\TableRate\Tax;
9
+
10
+ use FSVendor\WPDesk\FS\TableRate\Settings\MethodSettingsImplementation;
11
+
12
+ /**
13
+ * Can calculate taxes for rates.
14
+ */
15
+ class TaxCalculator {
16
+
17
+ const TAXABLE = 'taxable';
18
+
19
+ /**
20
+ * @var MethodSettingsImplementation
21
+ */
22
+ private $method_settings;
23
+
24
+ /**
25
+ * @var array
26
+ */
27
+ private $tax_rates;
28
+
29
+ /**
30
+ * TaxCalculator constructor.
31
+ *
32
+ * @param MethodSettingsImplementation $method_settings .
33
+ */
34
+ public function __construct( MethodSettingsImplementation $method_settings, array $tax_rates ) {
35
+ $this->method_settings = $method_settings;
36
+ $this->tax_rates = $tax_rates;
37
+ }
38
+
39
+ /**
40
+ * @param array $rate .
41
+ * @param bool $is_customer_vat_exempt .
42
+ */
43
+ public function append_taxes_to_rate_if_enabled( array $rate, $is_customer_vat_exempt ) {
44
+ if ( wc_tax_enabled() && 'yes' === $this->method_settings->get_prices_include_tax() && self::TAXABLE === $this->method_settings->get_tax_status() ) {
45
+ return $this->append_taxes_to_rate( $rate, $is_customer_vat_exempt );
46
+ }
47
+
48
+ return $rate;
49
+ }
50
+
51
+ /**
52
+ * @param array $rate .
53
+ * @param bool $is_customer_vat_exempt .
54
+ *
55
+ * @return array
56
+ */
57
+ private function append_taxes_to_rate( array $rate, bool $is_customer_vat_exempt ) {
58
+ $total_cost = $rate['cost'];
59
+ $taxes = \WC_Tax::calc_tax( $total_cost, $this->tax_rates, true );
60
+
61
+ $rate['cost'] = $total_cost - array_sum( $taxes );
62
+
63
+ $rate['taxes'] = $is_customer_vat_exempt ? [] : \WC_Tax::calc_shipping_tax( $rate['cost'], $this->tax_rates );
64
+
65
+ $rate['price_decimals'] = '4'; // Prevent the cost from being rounded before the tax is added.
66
+
67
+ return $rate;
68
+ }
69
+
70
+ }
src/WPDesk/FS/TableRate/Tax/Tracker.php ADDED
@@ -0,0 +1,59 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Tracker.
4
+ *
5
+ * @package WPDesk\FS\TableRate\Tax
6
+ */
7
+
8
+ namespace WPDesk\FS\TableRate\Tax;
9
+
10
+ use FSVendor\WPDesk\PluginBuilder\Plugin\Hookable;
11
+
12
+ /**
13
+ * Can add Tax data to tracker.
14
+ */
15
+ class Tracker implements Hookable {
16
+
17
+ /**
18
+ * Hooks.
19
+ */
20
+ public function hooks() {
21
+ add_filter( 'flexible-shipping/tracker/method-settings', [ $this, 'append_tax_data' ], 10, 2 );
22
+ }
23
+
24
+ /**
25
+ * @param array $data
26
+ * @param array $settings
27
+ *
28
+ * @return array
29
+ */
30
+ public function append_tax_data( array $data, array $settings ) {
31
+ $tax_status = isset( $settings['tax_status'] ) ? $settings['tax_status'] : 'not_set';
32
+ $data = $this->append_data( $data, 'tax_status', $tax_status );
33
+
34
+ $prices_include_tax = isset( $settings['prices_include_tax'] ) ? $settings['prices_include_tax'] : 'not_set';
35
+ $data = $this->append_data( $data, 'prices_include_tax', $prices_include_tax );
36
+
37
+ return $data;
38
+ }
39
+
40
+ /**
41
+ * @param array $data
42
+ * @param string $setting
43
+ * @param string $value
44
+ *
45
+ * @return array
46
+ */
47
+ private function append_data( array $data, $setting, $value ) {
48
+ if ( ! isset( $data[ $setting ] ) || ! is_array( $data[ $setting ] ) ) {
49
+ $data[ $setting ] = [];
50
+ }
51
+ if ( ! isset( $data[ $setting ][ $value ] ) ) {
52
+ $data[ $setting ][ $value ] = 0;
53
+ }
54
+ $data[ $setting ][ $value ]++;
55
+
56
+ return $data;
57
+ }
58
+
59
+ }
vendor/autoload.php CHANGED
@@ -4,4 +4,4 @@
4
 
5
  require_once __DIR__ . '/composer/autoload_real.php';
6
 
7
- return ComposerAutoloaderInit965f365a85d357c6c1d36b5fc1503e66::getLoader();
4
 
5
  require_once __DIR__ . '/composer/autoload_real.php';
6
 
7
+ return ComposerAutoloaderInit0342d6caab7e026e0c9344581e5b08e8::getLoader();
vendor/composer/autoload_classmap.php CHANGED
@@ -559,6 +559,8 @@ return array(
559
  'WPDesk\\FS\\TableRate\\ShippingMethod\\SettingsProcessor' => $baseDir . '/src/WPDesk/FS/TableRate/ShippingMethod/SettingsProcessor.php',
560
  'WPDesk\\FS\\TableRate\\ShippingMethod\\SingleMethodSettings' => $baseDir . '/src/WPDesk/FS/TableRate/ShippingMethod/SingleMethodSettings.php',
561
  'WPDesk\\FS\\TableRate\\SingleRuleSettings' => $baseDir . '/src/WPDesk/FS/TableRate/SingleRuleSettings.php',
 
 
562
  'WPDesk\\FS\\TableRate\\UserFeedback' => $baseDir . '/src/WPDesk/FS/TableRate/UserFeedback.php',
563
  'WPDesk\\FS\\Tracker\\TrackerNotices' => $baseDir . '/src/WPDesk/FS/Tracker/TrackerNotices.php',
564
  'WPDesk\\Helper\\HelperAsLibrary' => $vendorDir . '/wpdesk/wp-wpdesk-helper-override/src/Helper/HelperAsLibrary.php',
559
  'WPDesk\\FS\\TableRate\\ShippingMethod\\SettingsProcessor' => $baseDir . '/src/WPDesk/FS/TableRate/ShippingMethod/SettingsProcessor.php',
560
  'WPDesk\\FS\\TableRate\\ShippingMethod\\SingleMethodSettings' => $baseDir . '/src/WPDesk/FS/TableRate/ShippingMethod/SingleMethodSettings.php',
561
  'WPDesk\\FS\\TableRate\\SingleRuleSettings' => $baseDir . '/src/WPDesk/FS/TableRate/SingleRuleSettings.php',
562
+ 'WPDesk\\FS\\TableRate\\Tax\\TaxCalculator' => $baseDir . '/src/WPDesk/FS/TableRate/Tax/TaxCalculator.php',
563
+ 'WPDesk\\FS\\TableRate\\Tax\\Tracker' => $baseDir . '/src/WPDesk/FS/TableRate/Tax/Tracker.php',
564
  'WPDesk\\FS\\TableRate\\UserFeedback' => $baseDir . '/src/WPDesk/FS/TableRate/UserFeedback.php',
565
  'WPDesk\\FS\\Tracker\\TrackerNotices' => $baseDir . '/src/WPDesk/FS/Tracker/TrackerNotices.php',
566
  'WPDesk\\Helper\\HelperAsLibrary' => $vendorDir . '/wpdesk/wp-wpdesk-helper-override/src/Helper/HelperAsLibrary.php',
vendor/composer/autoload_real.php CHANGED
@@ -2,7 +2,7 @@
2
 
3
  // autoload_real.php @generated by Composer
4
 
5
- class ComposerAutoloaderInit965f365a85d357c6c1d36b5fc1503e66
6
  {
7
  private static $loader;
8
 
@@ -22,15 +22,15 @@ class ComposerAutoloaderInit965f365a85d357c6c1d36b5fc1503e66
22
  return self::$loader;
23
  }
24
 
25
- spl_autoload_register(array('ComposerAutoloaderInit965f365a85d357c6c1d36b5fc1503e66', 'loadClassLoader'), true, true);
26
  self::$loader = $loader = new \Composer\Autoload\ClassLoader();
27
- spl_autoload_unregister(array('ComposerAutoloaderInit965f365a85d357c6c1d36b5fc1503e66', 'loadClassLoader'));
28
 
29
  $useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
30
  if ($useStaticLoader) {
31
  require_once __DIR__ . '/autoload_static.php';
32
 
33
- call_user_func(\Composer\Autoload\ComposerStaticInit965f365a85d357c6c1d36b5fc1503e66::getInitializer($loader));
34
  } else {
35
  $map = require __DIR__ . '/autoload_namespaces.php';
36
  foreach ($map as $namespace => $path) {
@@ -51,19 +51,19 @@ class ComposerAutoloaderInit965f365a85d357c6c1d36b5fc1503e66
51
  $loader->register(true);
52
 
53
  if ($useStaticLoader) {
54
- $includeFiles = Composer\Autoload\ComposerStaticInit965f365a85d357c6c1d36b5fc1503e66::$files;
55
  } else {
56
  $includeFiles = require __DIR__ . '/autoload_files.php';
57
  }
58
  foreach ($includeFiles as $fileIdentifier => $file) {
59
- composerRequire965f365a85d357c6c1d36b5fc1503e66($fileIdentifier, $file);
60
  }
61
 
62
  return $loader;
63
  }
64
  }
65
 
66
- function composerRequire965f365a85d357c6c1d36b5fc1503e66($fileIdentifier, $file)
67
  {
68
  if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
69
  require $file;
2
 
3
  // autoload_real.php @generated by Composer
4
 
5
+ class ComposerAutoloaderInit0342d6caab7e026e0c9344581e5b08e8
6
  {
7
  private static $loader;
8
 
22
  return self::$loader;
23
  }
24
 
25
+ spl_autoload_register(array('ComposerAutoloaderInit0342d6caab7e026e0c9344581e5b08e8', 'loadClassLoader'), true, true);
26
  self::$loader = $loader = new \Composer\Autoload\ClassLoader();
27
+ spl_autoload_unregister(array('ComposerAutoloaderInit0342d6caab7e026e0c9344581e5b08e8', 'loadClassLoader'));
28
 
29
  $useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
30
  if ($useStaticLoader) {
31
  require_once __DIR__ . '/autoload_static.php';
32
 
33
+ call_user_func(\Composer\Autoload\ComposerStaticInit0342d6caab7e026e0c9344581e5b08e8::getInitializer($loader));
34
  } else {
35
  $map = require __DIR__ . '/autoload_namespaces.php';
36
  foreach ($map as $namespace => $path) {
51
  $loader->register(true);
52
 
53
  if ($useStaticLoader) {
54
+ $includeFiles = Composer\Autoload\ComposerStaticInit0342d6caab7e026e0c9344581e5b08e8::$files;
55
  } else {
56
  $includeFiles = require __DIR__ . '/autoload_files.php';
57
  }
58
  foreach ($includeFiles as $fileIdentifier => $file) {
59
+ composerRequire0342d6caab7e026e0c9344581e5b08e8($fileIdentifier, $file);
60
  }
61
 
62
  return $loader;
63
  }
64
  }
65
 
66
+ function composerRequire0342d6caab7e026e0c9344581e5b08e8($fileIdentifier, $file)
67
  {
68
  if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
69
  require $file;
vendor/composer/autoload_static.php CHANGED
@@ -4,7 +4,7 @@
4
 
5
  namespace Composer\Autoload;
6
 
7
- class ComposerStaticInit965f365a85d357c6c1d36b5fc1503e66
8
  {
9
  public static $files = array (
10
  '0509b34a4bd7aebefeac629c9dc8a978' => __DIR__ . '/..' . '/wpdesk/wp-notice/src/WPDesk/notice-functions.php',
@@ -600,6 +600,8 @@ class ComposerStaticInit965f365a85d357c6c1d36b5fc1503e66
600
  'WPDesk\\FS\\TableRate\\ShippingMethod\\SettingsProcessor' => __DIR__ . '/../..' . '/src/WPDesk/FS/TableRate/ShippingMethod/SettingsProcessor.php',
601
  'WPDesk\\FS\\TableRate\\ShippingMethod\\SingleMethodSettings' => __DIR__ . '/../..' . '/src/WPDesk/FS/TableRate/ShippingMethod/SingleMethodSettings.php',
602
  'WPDesk\\FS\\TableRate\\SingleRuleSettings' => __DIR__ . '/../..' . '/src/WPDesk/FS/TableRate/SingleRuleSettings.php',
 
 
603
  'WPDesk\\FS\\TableRate\\UserFeedback' => __DIR__ . '/../..' . '/src/WPDesk/FS/TableRate/UserFeedback.php',
604
  'WPDesk\\FS\\Tracker\\TrackerNotices' => __DIR__ . '/../..' . '/src/WPDesk/FS/Tracker/TrackerNotices.php',
605
  'WPDesk\\Helper\\HelperAsLibrary' => __DIR__ . '/..' . '/wpdesk/wp-wpdesk-helper-override/src/Helper/HelperAsLibrary.php',
@@ -660,10 +662,10 @@ class ComposerStaticInit965f365a85d357c6c1d36b5fc1503e66
660
  public static function getInitializer(ClassLoader $loader)
661
  {
662
  return \Closure::bind(function () use ($loader) {
663
- $loader->prefixLengthsPsr4 = ComposerStaticInit965f365a85d357c6c1d36b5fc1503e66::$prefixLengthsPsr4;
664
- $loader->prefixDirsPsr4 = ComposerStaticInit965f365a85d357c6c1d36b5fc1503e66::$prefixDirsPsr4;
665
- $loader->fallbackDirsPsr4 = ComposerStaticInit965f365a85d357c6c1d36b5fc1503e66::$fallbackDirsPsr4;
666
- $loader->classMap = ComposerStaticInit965f365a85d357c6c1d36b5fc1503e66::$classMap;
667
 
668
  }, null, ClassLoader::class);
669
  }
4
 
5
  namespace Composer\Autoload;
6
 
7
+ class ComposerStaticInit0342d6caab7e026e0c9344581e5b08e8
8
  {
9
  public static $files = array (
10
  '0509b34a4bd7aebefeac629c9dc8a978' => __DIR__ . '/..' . '/wpdesk/wp-notice/src/WPDesk/notice-functions.php',
600
  'WPDesk\\FS\\TableRate\\ShippingMethod\\SettingsProcessor' => __DIR__ . '/../..' . '/src/WPDesk/FS/TableRate/ShippingMethod/SettingsProcessor.php',
601
  'WPDesk\\FS\\TableRate\\ShippingMethod\\SingleMethodSettings' => __DIR__ . '/../..' . '/src/WPDesk/FS/TableRate/ShippingMethod/SingleMethodSettings.php',
602
  'WPDesk\\FS\\TableRate\\SingleRuleSettings' => __DIR__ . '/../..' . '/src/WPDesk/FS/TableRate/SingleRuleSettings.php',
603
+ 'WPDesk\\FS\\TableRate\\Tax\\TaxCalculator' => __DIR__ . '/../..' . '/src/WPDesk/FS/TableRate/Tax/TaxCalculator.php',
604
+ 'WPDesk\\FS\\TableRate\\Tax\\Tracker' => __DIR__ . '/../..' . '/src/WPDesk/FS/TableRate/Tax/Tracker.php',
605
  'WPDesk\\FS\\TableRate\\UserFeedback' => __DIR__ . '/../..' . '/src/WPDesk/FS/TableRate/UserFeedback.php',
606
  'WPDesk\\FS\\Tracker\\TrackerNotices' => __DIR__ . '/../..' . '/src/WPDesk/FS/Tracker/TrackerNotices.php',
607
  'WPDesk\\Helper\\HelperAsLibrary' => __DIR__ . '/..' . '/wpdesk/wp-wpdesk-helper-override/src/Helper/HelperAsLibrary.php',
662
  public static function getInitializer(ClassLoader $loader)
663
  {
664
  return \Closure::bind(function () use ($loader) {
665
+ $loader->prefixLengthsPsr4 = ComposerStaticInit0342d6caab7e026e0c9344581e5b08e8::$prefixLengthsPsr4;
666
+ $loader->prefixDirsPsr4 = ComposerStaticInit0342d6caab7e026e0c9344581e5b08e8::$prefixDirsPsr4;
667
+ $loader->fallbackDirsPsr4 = ComposerStaticInit0342d6caab7e026e0c9344581e5b08e8::$fallbackDirsPsr4;
668
+ $loader->classMap = ComposerStaticInit0342d6caab7e026e0c9344581e5b08e8::$classMap;
669
 
670
  }, null, ClassLoader::class);
671
  }