Flexible Shipping for WooCommerce - Version 3.9.9

Version Description

  • 2020-02-17 =
  • Added log messages in WPDesk_Flexible_Shipping_Shipment class.
  • Fixed fatal error in checkout: strongly typed array in woocommerce_shipping_chosen_method filter
Download this release

Release Info

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

Code changes from version 3.9.7 to 3.9.9

classes/class-flexible-shipping-plugin.php CHANGED
@@ -94,6 +94,14 @@ class Flexible_Shipping_Plugin extends AbstractPlugin implements HookableCollect
94
  $this->plugin_info = $plugin_info;
95
  parent::__construct( $this->plugin_info );
96
  $this->init_logger();
 
 
 
 
 
 
 
 
97
  }
98
 
99
  /**
@@ -411,15 +419,21 @@ class Flexible_Shipping_Plugin extends AbstractPlugin implements HookableCollect
411
  *
412
  * @param string $default Default shipping method in frontend.
413
  * @param WC_Shipping_Rate[] $available_methods Available methods in frontend.
 
 
 
414
  * @param string|bool|null $chosen_method If false or null then no method is chosen.
415
  *
416
  * @return string
417
  */
418
- public function woocommerce_default_shipment_method( $default, array $available_methods, $chosen_method ) {
419
  // @TODO: Infinite methods calling on Woocommerce 3.1
420
  if ( version_compare( WC_VERSION, '3.2', '<' ) ) {
421
  return $default;
422
  }
 
 
 
423
  if ( null === $chosen_method || false === $chosen_method || ! $this->check_if_shipment_available_for_current_cart( $chosen_method ) ) {
424
  foreach ( $available_methods as $available_method ) {
425
  $method_meta = $available_method->get_meta_data();
94
  $this->plugin_info = $plugin_info;
95
  parent::__construct( $this->plugin_info );
96
  $this->init_logger();
97
+ $this->init_logger_on_shipment();
98
+ }
99
+
100
+ /**
101
+ * Init logger on WPDesk_Flexible_Shipping_Shipment class.
102
+ */
103
+ public function init_logger_on_shipment() {
104
+ WPDesk_Flexible_Shipping_Shipment::set_fs_logger( $this->logger );
105
  }
106
 
107
  /**
419
  *
420
  * @param string $default Default shipping method in frontend.
421
  * @param WC_Shipping_Rate[] $available_methods Available methods in frontend.
422
+ * Function is assigned to woocommerce_default_shipment_method filter.
423
+ * In this parameter we expecting array of WC_Shipping_Rate objects.
424
+ * But third party plugins can change this parameter type or set it to null.
425
  * @param string|bool|null $chosen_method If false or null then no method is chosen.
426
  *
427
  * @return string
428
  */
429
+ public function woocommerce_default_shipment_method( $default, $available_methods, $chosen_method ) {
430
  // @TODO: Infinite methods calling on Woocommerce 3.1
431
  if ( version_compare( WC_VERSION, '3.2', '<' ) ) {
432
  return $default;
433
  }
434
+ if ( ! is_array( $available_methods ) ) {
435
+ return $default;
436
+ }
437
  if ( null === $chosen_method || false === $chosen_method || ! $this->check_if_shipment_available_for_current_cart( $chosen_method ) ) {
438
  foreach ( $available_methods as $available_method ) {
439
  $method_meta = $available_method->get_meta_data();
classes/wp-wpdesk-fs-shipment/shipment/class-shipment.php CHANGED
@@ -1,5 +1,7 @@
1
  <?php
2
 
 
 
3
  if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
4
 
5
  if ( ! class_exists( 'WPDesk_Flexible_Shipping_Shipment' ) ) {
@@ -83,6 +85,13 @@ if ( ! class_exists( 'WPDesk_Flexible_Shipping_Shipment' ) ) {
83
  */
84
  private $order_metabox_context = 'side';
85
 
 
 
 
 
 
 
 
86
  /**
87
  * WPDesk_Flexible_Shipping_Shipment constructor.
88
  *
@@ -103,6 +112,35 @@ if ( ! class_exists( 'WPDesk_Flexible_Shipping_Shipment' ) ) {
103
  $this->order = $order;
104
  }
105
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
106
  /**
107
  * @return mixed
108
  */
@@ -194,14 +232,17 @@ if ( ! class_exists( 'WPDesk_Flexible_Shipping_Shipment' ) ) {
194
  public function save() {
195
  if ( $this->save_post ) {
196
  wp_update_post($this->post);
 
197
  $this->save_post = false;
198
  }
199
  foreach ( $this->meta_data_save_keys as $key ) {
200
  if ( isset( $this->meta_data[$key] ) ) {
201
  update_post_meta( $this->id, $key, $this->meta_data[$key][0] );
 
202
  }
203
  else {
204
  delete_post_meta( $this->id, $key );
 
205
  }
206
  unset( $this->meta_data_save_keys[$key] );
207
  }
1
  <?php
2
 
3
+ use Psr\Log\LoggerInterface;
4
+
5
  if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
6
 
7
  if ( ! class_exists( 'WPDesk_Flexible_Shipping_Shipment' ) ) {
85
  */
86
  private $order_metabox_context = 'side';
87
 
88
+ /**
89
+ * Logger provided by Flexible Shipping plugin.
90
+ *
91
+ * @var LoggerInterface
92
+ */
93
+ protected static $fs_logger;
94
+
95
  /**
96
  * WPDesk_Flexible_Shipping_Shipment constructor.
97
  *
112
  $this->order = $order;
113
  }
114
 
115
+ /**
116
+ * Set logger. This logger is set by Flexible Shipping plugin.
117
+ *
118
+ * @param LoggerInterface $fs_logger .
119
+ */
120
+ public static function set_fs_logger( LoggerInterface $fs_logger ) {
121
+ static::$fs_logger = $fs_logger;
122
+ }
123
+
124
+ /**
125
+ * Writes log message to log provided by Flexible Shipping plugin.
126
+ *
127
+ * @param mixed $level .
128
+ * @param string $message .
129
+ * @param array $context .
130
+ */
131
+ private function fs_log( $level, $message, array $context = array() ) {
132
+ if ( static::$fs_logger ) {
133
+ $context['order_id'] = $this->get_order()->get_id();
134
+ $context['shipment_id'] = $this->get_id();
135
+ $current_user = wp_get_current_user();
136
+ $context['user_id'] = $current_user->ID;
137
+ if ( isset( $_SERVER['REQUEST_URI'] ) ) {
138
+ $context['request_uri'] = sanitize_text_field( wp_unslash( $_SERVER['REQUEST_URI'] ) );
139
+ }
140
+ static::$fs_logger->log( $level, $message, $context );
141
+ }
142
+ }
143
+
144
  /**
145
  * @return mixed
146
  */
232
  public function save() {
233
  if ( $this->save_post ) {
234
  wp_update_post($this->post);
235
+ $this->fs_log( 'debug', 'Shipment post saved', [ 'post' => $this->post ] );
236
  $this->save_post = false;
237
  }
238
  foreach ( $this->meta_data_save_keys as $key ) {
239
  if ( isset( $this->meta_data[$key] ) ) {
240
  update_post_meta( $this->id, $key, $this->meta_data[$key][0] );
241
+ $this->fs_log( 'debug', 'Shipment meta data saved', [ 'key' => $key, 'value' => $this->meta_data[$key][0] ] );
242
  }
243
  else {
244
  delete_post_meta( $this->id, $key );
245
+ $this->fs_log( 'debug', 'Shipment meta data deleted', [ 'key' => $key ] );
246
  }
247
  unset( $this->meta_data_save_keys[$key] );
248
  }
composer.lock CHANGED
@@ -462,16 +462,16 @@
462
  },
463
  {
464
  "name": "composer/composer",
465
- "version": "1.9.2",
466
  "source": {
467
  "type": "git",
468
  "url": "https://github.com/composer/composer.git",
469
- "reference": "7a04aa0201ddaa0b3cf64d41022bd8cdcd7fafeb"
470
  },
471
  "dist": {
472
  "type": "zip",
473
- "url": "https://api.github.com/repos/composer/composer/zipball/7a04aa0201ddaa0b3cf64d41022bd8cdcd7fafeb",
474
- "reference": "7a04aa0201ddaa0b3cf64d41022bd8cdcd7fafeb",
475
  "shasum": ""
476
  },
477
  "require": {
@@ -538,7 +538,7 @@
538
  "dependency",
539
  "package"
540
  ],
541
- "time": "2020-01-14T15:30:32+00:00"
542
  },
543
  {
544
  "name": "composer/semver",
@@ -603,16 +603,16 @@
603
  },
604
  {
605
  "name": "composer/spdx-licenses",
606
- "version": "1.5.2",
607
  "source": {
608
  "type": "git",
609
  "url": "https://github.com/composer/spdx-licenses.git",
610
- "reference": "7ac1e6aec371357df067f8a688c3d6974df68fa5"
611
  },
612
  "dist": {
613
  "type": "zip",
614
- "url": "https://api.github.com/repos/composer/spdx-licenses/zipball/7ac1e6aec371357df067f8a688c3d6974df68fa5",
615
- "reference": "7ac1e6aec371357df067f8a688c3d6974df68fa5",
616
  "shasum": ""
617
  },
618
  "require": {
@@ -659,7 +659,7 @@
659
  "spdx",
660
  "validator"
661
  ],
662
- "time": "2019-07-29T10:31:59+00:00"
663
  },
664
  {
665
  "name": "composer/xdebug-handler",
@@ -1034,6 +1034,7 @@
1034
  "selenium",
1035
  "webdriver"
1036
  ],
 
1037
  "time": "2019-06-13T08:02:18+00:00"
1038
  },
1039
  {
@@ -2210,16 +2211,16 @@
2210
  },
2211
  {
2212
  "name": "lucatume/wp-browser",
2213
- "version": "2.2.34",
2214
  "source": {
2215
  "type": "git",
2216
  "url": "https://github.com/lucatume/wp-browser.git",
2217
- "reference": "ab02739d04edc342a41b317f6dcb72a3d1eef590"
2218
  },
2219
  "dist": {
2220
  "type": "zip",
2221
- "url": "https://api.github.com/repos/lucatume/wp-browser/zipball/ab02739d04edc342a41b317f6dcb72a3d1eef590",
2222
- "reference": "ab02739d04edc342a41b317f6dcb72a3d1eef590",
2223
  "shasum": ""
2224
  },
2225
  "require": {
@@ -2242,7 +2243,7 @@
2242
  },
2243
  "require-dev": {
2244
  "erusev/parsedown": "^1.7",
2245
- "lucatume/codeception-snapshot-assertions": "^0.2.2",
2246
  "mikey179/vfsstream": "^1.6",
2247
  "phpstan/phpstan": "^0.11.15",
2248
  "phpstan/phpstan-shim": "^0.11.15",
@@ -2280,7 +2281,7 @@
2280
  "codeception",
2281
  "wordpress"
2282
  ],
2283
- "time": "2020-01-29T08:30:29+00:00"
2284
  },
2285
  {
2286
  "name": "matthiasmullie/minify",
@@ -4321,16 +4322,16 @@
4321
  },
4322
  {
4323
  "name": "seld/phar-utils",
4324
- "version": "1.0.2",
4325
  "source": {
4326
  "type": "git",
4327
  "url": "https://github.com/Seldaek/phar-utils.git",
4328
- "reference": "84715761c35808076b00908a20317a3a8a67d17e"
4329
  },
4330
  "dist": {
4331
  "type": "zip",
4332
- "url": "https://api.github.com/repos/Seldaek/phar-utils/zipball/84715761c35808076b00908a20317a3a8a67d17e",
4333
- "reference": "84715761c35808076b00908a20317a3a8a67d17e",
4334
  "shasum": ""
4335
  },
4336
  "require": {
@@ -4359,9 +4360,9 @@
4359
  ],
4360
  "description": "PHAR file format utilities, for when PHP phars you up",
4361
  "keywords": [
4362
- "phra"
4363
  ],
4364
- "time": "2020-01-13T10:41:09+00:00"
4365
  },
4366
  {
4367
  "name": "squizlabs/php_codesniffer",
@@ -4873,16 +4874,16 @@
4873
  },
4874
  {
4875
  "name": "symfony/polyfill-ctype",
4876
- "version": "v1.13.1",
4877
  "source": {
4878
  "type": "git",
4879
  "url": "https://github.com/symfony/polyfill-ctype.git",
4880
- "reference": "f8f0b461be3385e56d6de3dbb5a0df24c0c275e3"
4881
  },
4882
  "dist": {
4883
  "type": "zip",
4884
- "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/f8f0b461be3385e56d6de3dbb5a0df24c0c275e3",
4885
- "reference": "f8f0b461be3385e56d6de3dbb5a0df24c0c275e3",
4886
  "shasum": ""
4887
  },
4888
  "require": {
@@ -4894,7 +4895,7 @@
4894
  "type": "library",
4895
  "extra": {
4896
  "branch-alias": {
4897
- "dev-master": "1.13-dev"
4898
  }
4899
  },
4900
  "autoload": {
@@ -4927,20 +4928,20 @@
4927
  "polyfill",
4928
  "portable"
4929
  ],
4930
- "time": "2019-11-27T13:56:44+00:00"
4931
  },
4932
  {
4933
  "name": "symfony/polyfill-mbstring",
4934
- "version": "v1.13.1",
4935
  "source": {
4936
  "type": "git",
4937
  "url": "https://github.com/symfony/polyfill-mbstring.git",
4938
- "reference": "7b4aab9743c30be783b73de055d24a39cf4b954f"
4939
  },
4940
  "dist": {
4941
  "type": "zip",
4942
- "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/7b4aab9743c30be783b73de055d24a39cf4b954f",
4943
- "reference": "7b4aab9743c30be783b73de055d24a39cf4b954f",
4944
  "shasum": ""
4945
  },
4946
  "require": {
@@ -4952,7 +4953,7 @@
4952
  "type": "library",
4953
  "extra": {
4954
  "branch-alias": {
4955
- "dev-master": "1.13-dev"
4956
  }
4957
  },
4958
  "autoload": {
@@ -4986,7 +4987,7 @@
4986
  "portable",
4987
  "shim"
4988
  ],
4989
- "time": "2019-11-27T14:18:11+00:00"
4990
  },
4991
  {
4992
  "name": "symfony/process",
@@ -5203,16 +5204,16 @@
5203
  },
5204
  {
5205
  "name": "webmozart/assert",
5206
- "version": "1.6.0",
5207
  "source": {
5208
  "type": "git",
5209
  "url": "https://github.com/webmozart/assert.git",
5210
- "reference": "573381c0a64f155a0d9a23f4b0c797194805b925"
5211
  },
5212
  "dist": {
5213
  "type": "zip",
5214
- "url": "https://api.github.com/repos/webmozart/assert/zipball/573381c0a64f155a0d9a23f4b0c797194805b925",
5215
- "reference": "573381c0a64f155a0d9a23f4b0c797194805b925",
5216
  "shasum": ""
5217
  },
5218
  "require": {
@@ -5247,7 +5248,7 @@
5247
  "check",
5248
  "validate"
5249
  ],
5250
- "time": "2019-11-24T13:36:37+00:00"
5251
  },
5252
  {
5253
  "name": "wp-cli/cache-command",
@@ -5511,16 +5512,16 @@
5511
  },
5512
  {
5513
  "name": "wp-cli/cron-command",
5514
- "version": "v2.0.3",
5515
  "source": {
5516
  "type": "git",
5517
  "url": "https://github.com/wp-cli/cron-command.git",
5518
- "reference": "b6d0c8ff69cc56d5316a35a7a2fcc314c4069585"
5519
  },
5520
  "dist": {
5521
  "type": "zip",
5522
- "url": "https://api.github.com/repos/wp-cli/cron-command/zipball/b6d0c8ff69cc56d5316a35a7a2fcc314c4069585",
5523
- "reference": "b6d0c8ff69cc56d5316a35a7a2fcc314c4069585",
5524
  "shasum": ""
5525
  },
5526
  "require": {
@@ -5545,7 +5546,8 @@
5545
  "cron event run",
5546
  "cron event schedule",
5547
  "cron schedule",
5548
- "cron schedule list"
 
5549
  ]
5550
  },
5551
  "autoload": {
@@ -5569,20 +5571,20 @@
5569
  ],
5570
  "description": "Tests, runs, and deletes WP-Cron events; manages WP-Cron schedules.",
5571
  "homepage": "https://github.com/wp-cli/cron-command",
5572
- "time": "2019-04-24T07:31:46+00:00"
5573
  },
5574
  {
5575
  "name": "wp-cli/db-command",
5576
- "version": "v2.0.5",
5577
  "source": {
5578
  "type": "git",
5579
  "url": "https://github.com/wp-cli/db-command.git",
5580
- "reference": "119cf31491577d0a79ad42021dfeb8ac1138342b"
5581
  },
5582
  "dist": {
5583
  "type": "zip",
5584
- "url": "https://api.github.com/repos/wp-cli/db-command/zipball/119cf31491577d0a79ad42021dfeb8ac1138342b",
5585
- "reference": "119cf31491577d0a79ad42021dfeb8ac1138342b",
5586
  "shasum": ""
5587
  },
5588
  "require": {
@@ -5639,7 +5641,7 @@
5639
  ],
5640
  "description": "Performs basic database operations using credentials stored in wp-config.php.",
5641
  "homepage": "https://github.com/wp-cli/db-command",
5642
- "time": "2019-11-12T05:05:58+00:00"
5643
  },
5644
  {
5645
  "name": "wp-cli/embed-command",
@@ -5912,16 +5914,16 @@
5912
  },
5913
  {
5914
  "name": "wp-cli/eval-command",
5915
- "version": "v2.0.5",
5916
  "source": {
5917
  "type": "git",
5918
  "url": "https://github.com/wp-cli/eval-command.git",
5919
- "reference": "945aaebc761a694cf302985088ef6b19a4567643"
5920
  },
5921
  "dist": {
5922
  "type": "zip",
5923
- "url": "https://api.github.com/repos/wp-cli/eval-command/zipball/945aaebc761a694cf302985088ef6b19a4567643",
5924
- "reference": "945aaebc761a694cf302985088ef6b19a4567643",
5925
  "shasum": ""
5926
  },
5927
  "require": {
@@ -5962,7 +5964,7 @@
5962
  ],
5963
  "description": "Executes arbitrary PHP code or files.",
5964
  "homepage": "https://github.com/wp-cli/eval-command",
5965
- "time": "2019-11-12T01:36:20+00:00"
5966
  },
5967
  {
5968
  "name": "wp-cli/export-command",
@@ -6111,16 +6113,16 @@
6111
  },
6112
  {
6113
  "name": "wp-cli/i18n-command",
6114
- "version": "v2.2.1",
6115
  "source": {
6116
  "type": "git",
6117
  "url": "https://github.com/wp-cli/i18n-command.git",
6118
- "reference": "6a0582103ecf4a28b3086eac55a9fe590bd3dc96"
6119
  },
6120
  "dist": {
6121
  "type": "zip",
6122
- "url": "https://api.github.com/repos/wp-cli/i18n-command/zipball/6a0582103ecf4a28b3086eac55a9fe590bd3dc96",
6123
- "reference": "6a0582103ecf4a28b3086eac55a9fe590bd3dc96",
6124
  "shasum": ""
6125
  },
6126
  "require": {
@@ -6164,7 +6166,7 @@
6164
  ],
6165
  "description": "Provides internationalization tools for WordPress projects.",
6166
  "homepage": "https://github.com/wp-cli/i18n-command",
6167
- "time": "2019-11-12T06:57:35+00:00"
6168
  },
6169
  {
6170
  "name": "wp-cli/import-command",
@@ -6692,16 +6694,16 @@
6692
  },
6693
  {
6694
  "name": "wp-cli/scaffold-command",
6695
- "version": "v2.0.7",
6696
  "source": {
6697
  "type": "git",
6698
  "url": "https://github.com/wp-cli/scaffold-command.git",
6699
- "reference": "fe73e6f71c2a03908bb5ceac17a0e408544a868a"
6700
  },
6701
  "dist": {
6702
  "type": "zip",
6703
- "url": "https://api.github.com/repos/wp-cli/scaffold-command/zipball/fe73e6f71c2a03908bb5ceac17a0e408544a868a",
6704
- "reference": "fe73e6f71c2a03908bb5ceac17a0e408544a868a",
6705
  "shasum": ""
6706
  },
6707
  "require": {
@@ -6751,20 +6753,20 @@
6751
  ],
6752
  "description": "Generates code for post types, taxonomies, blocks, plugins, child themes, etc.",
6753
  "homepage": "https://github.com/wp-cli/scaffold-command",
6754
- "time": "2019-11-12T11:32:15+00:00"
6755
  },
6756
  {
6757
  "name": "wp-cli/search-replace-command",
6758
- "version": "v2.0.5",
6759
  "source": {
6760
  "type": "git",
6761
  "url": "https://github.com/wp-cli/search-replace-command.git",
6762
- "reference": "d53ae0715d3701ef22826d5c7b46973a1b24e472"
6763
  },
6764
  "dist": {
6765
  "type": "zip",
6766
- "url": "https://api.github.com/repos/wp-cli/search-replace-command/zipball/d53ae0715d3701ef22826d5c7b46973a1b24e472",
6767
- "reference": "d53ae0715d3701ef22826d5c7b46973a1b24e472",
6768
  "shasum": ""
6769
  },
6770
  "require": {
@@ -6807,7 +6809,7 @@
6807
  ],
6808
  "description": "Searches/replaces strings in the database.",
6809
  "homepage": "https://github.com/wp-cli/search-replace-command",
6810
- "time": "2019-11-12T01:29:55+00:00"
6811
  },
6812
  {
6813
  "name": "wp-cli/server-command",
@@ -6975,20 +6977,20 @@
6975
  },
6976
  {
6977
  "name": "wp-cli/widget-command",
6978
- "version": "v2.0.2",
6979
  "source": {
6980
  "type": "git",
6981
  "url": "https://github.com/wp-cli/widget-command.git",
6982
- "reference": "58a1b2d2221cee852eb8a589535aaadb1217bb74"
6983
  },
6984
  "dist": {
6985
  "type": "zip",
6986
- "url": "https://api.github.com/repos/wp-cli/widget-command/zipball/58a1b2d2221cee852eb8a589535aaadb1217bb74",
6987
- "reference": "58a1b2d2221cee852eb8a589535aaadb1217bb74",
6988
  "shasum": ""
6989
  },
6990
  "require": {
6991
- "wp-cli/wp-cli": "^2"
6992
  },
6993
  "require-dev": {
6994
  "wp-cli/extension-command": "^1.2 || ^2",
@@ -7034,7 +7036,7 @@
7034
  ],
7035
  "description": "Adds, moves, and removes widgets; lists sidebars.",
7036
  "homepage": "https://github.com/wp-cli/widget-command",
7037
- "time": "2019-04-25T00:25:21+00:00"
7038
  },
7039
  {
7040
  "name": "wp-cli/wp-cli",
462
  },
463
  {
464
  "name": "composer/composer",
465
+ "version": "1.9.3",
466
  "source": {
467
  "type": "git",
468
  "url": "https://github.com/composer/composer.git",
469
+ "reference": "1291a16ce3f48bfdeca39d64fca4875098af4d7b"
470
  },
471
  "dist": {
472
  "type": "zip",
473
+ "url": "https://api.github.com/repos/composer/composer/zipball/1291a16ce3f48bfdeca39d64fca4875098af4d7b",
474
+ "reference": "1291a16ce3f48bfdeca39d64fca4875098af4d7b",
475
  "shasum": ""
476
  },
477
  "require": {
538
  "dependency",
539
  "package"
540
  ],
541
+ "time": "2020-02-04T11:58:49+00:00"
542
  },
543
  {
544
  "name": "composer/semver",
603
  },
604
  {
605
  "name": "composer/spdx-licenses",
606
+ "version": "1.5.3",
607
  "source": {
608
  "type": "git",
609
  "url": "https://github.com/composer/spdx-licenses.git",
610
+ "reference": "0c3e51e1880ca149682332770e25977c70cf9dae"
611
  },
612
  "dist": {
613
  "type": "zip",
614
+ "url": "https://api.github.com/repos/composer/spdx-licenses/zipball/0c3e51e1880ca149682332770e25977c70cf9dae",
615
+ "reference": "0c3e51e1880ca149682332770e25977c70cf9dae",
616
  "shasum": ""
617
  },
618
  "require": {
659
  "spdx",
660
  "validator"
661
  ],
662
+ "time": "2020-02-14T07:44:31+00:00"
663
  },
664
  {
665
  "name": "composer/xdebug-handler",
1034
  "selenium",
1035
  "webdriver"
1036
  ],
1037
+ "abandoned": "php-webdriver/webdriver",
1038
  "time": "2019-06-13T08:02:18+00:00"
1039
  },
1040
  {
2211
  },
2212
  {
2213
  "name": "lucatume/wp-browser",
2214
+ "version": "2.2.35",
2215
  "source": {
2216
  "type": "git",
2217
  "url": "https://github.com/lucatume/wp-browser.git",
2218
+ "reference": "a652148ef116b91c5a8ed417345f1e8692211f7f"
2219
  },
2220
  "dist": {
2221
  "type": "zip",
2222
+ "url": "https://api.github.com/repos/lucatume/wp-browser/zipball/a652148ef116b91c5a8ed417345f1e8692211f7f",
2223
+ "reference": "a652148ef116b91c5a8ed417345f1e8692211f7f",
2224
  "shasum": ""
2225
  },
2226
  "require": {
2243
  },
2244
  "require-dev": {
2245
  "erusev/parsedown": "^1.7",
2246
+ "lucatume/codeception-snapshot-assertions": "^0.2",
2247
  "mikey179/vfsstream": "^1.6",
2248
  "phpstan/phpstan": "^0.11.15",
2249
  "phpstan/phpstan-shim": "^0.11.15",
2281
  "codeception",
2282
  "wordpress"
2283
  ],
2284
+ "time": "2020-02-13T17:12:22+00:00"
2285
  },
2286
  {
2287
  "name": "matthiasmullie/minify",
4322
  },
4323
  {
4324
  "name": "seld/phar-utils",
4325
+ "version": "1.1.0",
4326
  "source": {
4327
  "type": "git",
4328
  "url": "https://github.com/Seldaek/phar-utils.git",
4329
+ "reference": "8800503d56b9867d43d9c303b9cbcc26016e82f0"
4330
  },
4331
  "dist": {
4332
  "type": "zip",
4333
+ "url": "https://api.github.com/repos/Seldaek/phar-utils/zipball/8800503d56b9867d43d9c303b9cbcc26016e82f0",
4334
+ "reference": "8800503d56b9867d43d9c303b9cbcc26016e82f0",
4335
  "shasum": ""
4336
  },
4337
  "require": {
4360
  ],
4361
  "description": "PHAR file format utilities, for when PHP phars you up",
4362
  "keywords": [
4363
+ "phar"
4364
  ],
4365
+ "time": "2020-02-14T15:25:33+00:00"
4366
  },
4367
  {
4368
  "name": "squizlabs/php_codesniffer",
4874
  },
4875
  {
4876
  "name": "symfony/polyfill-ctype",
4877
+ "version": "v1.14.0",
4878
  "source": {
4879
  "type": "git",
4880
  "url": "https://github.com/symfony/polyfill-ctype.git",
4881
+ "reference": "fbdeaec0df06cf3d51c93de80c7eb76e271f5a38"
4882
  },
4883
  "dist": {
4884
  "type": "zip",
4885
+ "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/fbdeaec0df06cf3d51c93de80c7eb76e271f5a38",
4886
+ "reference": "fbdeaec0df06cf3d51c93de80c7eb76e271f5a38",
4887
  "shasum": ""
4888
  },
4889
  "require": {
4895
  "type": "library",
4896
  "extra": {
4897
  "branch-alias": {
4898
+ "dev-master": "1.14-dev"
4899
  }
4900
  },
4901
  "autoload": {
4928
  "polyfill",
4929
  "portable"
4930
  ],
4931
+ "time": "2020-01-13T11:15:53+00:00"
4932
  },
4933
  {
4934
  "name": "symfony/polyfill-mbstring",
4935
+ "version": "v1.14.0",
4936
  "source": {
4937
  "type": "git",
4938
  "url": "https://github.com/symfony/polyfill-mbstring.git",
4939
+ "reference": "34094cfa9abe1f0f14f48f490772db7a775559f2"
4940
  },
4941
  "dist": {
4942
  "type": "zip",
4943
+ "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/34094cfa9abe1f0f14f48f490772db7a775559f2",
4944
+ "reference": "34094cfa9abe1f0f14f48f490772db7a775559f2",
4945
  "shasum": ""
4946
  },
4947
  "require": {
4953
  "type": "library",
4954
  "extra": {
4955
  "branch-alias": {
4956
+ "dev-master": "1.14-dev"
4957
  }
4958
  },
4959
  "autoload": {
4987
  "portable",
4988
  "shim"
4989
  ],
4990
+ "time": "2020-01-13T11:15:53+00:00"
4991
  },
4992
  {
4993
  "name": "symfony/process",
5204
  },
5205
  {
5206
  "name": "webmozart/assert",
5207
+ "version": "1.7.0",
5208
  "source": {
5209
  "type": "git",
5210
  "url": "https://github.com/webmozart/assert.git",
5211
+ "reference": "aed98a490f9a8f78468232db345ab9cf606cf598"
5212
  },
5213
  "dist": {
5214
  "type": "zip",
5215
+ "url": "https://api.github.com/repos/webmozart/assert/zipball/aed98a490f9a8f78468232db345ab9cf606cf598",
5216
+ "reference": "aed98a490f9a8f78468232db345ab9cf606cf598",
5217
  "shasum": ""
5218
  },
5219
  "require": {
5248
  "check",
5249
  "validate"
5250
  ],
5251
+ "time": "2020-02-14T12:15:55+00:00"
5252
  },
5253
  {
5254
  "name": "wp-cli/cache-command",
5512
  },
5513
  {
5514
  "name": "wp-cli/cron-command",
5515
+ "version": "v2.0.4",
5516
  "source": {
5517
  "type": "git",
5518
  "url": "https://github.com/wp-cli/cron-command.git",
5519
+ "reference": "184ce82dfd6e7284a73f039ae39cf51a5f73174e"
5520
  },
5521
  "dist": {
5522
  "type": "zip",
5523
+ "url": "https://api.github.com/repos/wp-cli/cron-command/zipball/184ce82dfd6e7284a73f039ae39cf51a5f73174e",
5524
+ "reference": "184ce82dfd6e7284a73f039ae39cf51a5f73174e",
5525
  "shasum": ""
5526
  },
5527
  "require": {
5546
  "cron event run",
5547
  "cron event schedule",
5548
  "cron schedule",
5549
+ "cron schedule list",
5550
+ "cron event unschedule"
5551
  ]
5552
  },
5553
  "autoload": {
5571
  ],
5572
  "description": "Tests, runs, and deletes WP-Cron events; manages WP-Cron schedules.",
5573
  "homepage": "https://github.com/wp-cli/cron-command",
5574
+ "time": "2019-12-17T17:53:36+00:00"
5575
  },
5576
  {
5577
  "name": "wp-cli/db-command",
5578
+ "version": "v2.0.6",
5579
  "source": {
5580
  "type": "git",
5581
  "url": "https://github.com/wp-cli/db-command.git",
5582
+ "reference": "8e3cd46987241ed97ddb7f682b3505dff8d6dce4"
5583
  },
5584
  "dist": {
5585
  "type": "zip",
5586
+ "url": "https://api.github.com/repos/wp-cli/db-command/zipball/8e3cd46987241ed97ddb7f682b3505dff8d6dce4",
5587
+ "reference": "8e3cd46987241ed97ddb7f682b3505dff8d6dce4",
5588
  "shasum": ""
5589
  },
5590
  "require": {
5641
  ],
5642
  "description": "Performs basic database operations using credentials stored in wp-config.php.",
5643
  "homepage": "https://github.com/wp-cli/db-command",
5644
+ "time": "2020-01-28T16:39:32+00:00"
5645
  },
5646
  {
5647
  "name": "wp-cli/embed-command",
5914
  },
5915
  {
5916
  "name": "wp-cli/eval-command",
5917
+ "version": "v2.0.6",
5918
  "source": {
5919
  "type": "git",
5920
  "url": "https://github.com/wp-cli/eval-command.git",
5921
+ "reference": "d379732f9899387a6a631ccea5116b3da6f16300"
5922
  },
5923
  "dist": {
5924
  "type": "zip",
5925
+ "url": "https://api.github.com/repos/wp-cli/eval-command/zipball/d379732f9899387a6a631ccea5116b3da6f16300",
5926
+ "reference": "d379732f9899387a6a631ccea5116b3da6f16300",
5927
  "shasum": ""
5928
  },
5929
  "require": {
5964
  ],
5965
  "description": "Executes arbitrary PHP code or files.",
5966
  "homepage": "https://github.com/wp-cli/eval-command",
5967
+ "time": "2020-02-06T11:24:47+00:00"
5968
  },
5969
  {
5970
  "name": "wp-cli/export-command",
6113
  },
6114
  {
6115
  "name": "wp-cli/i18n-command",
6116
+ "version": "v2.2.2",
6117
  "source": {
6118
  "type": "git",
6119
  "url": "https://github.com/wp-cli/i18n-command.git",
6120
+ "reference": "2804c5246d9338da59951737b03c54d257be8e47"
6121
  },
6122
  "dist": {
6123
  "type": "zip",
6124
+ "url": "https://api.github.com/repos/wp-cli/i18n-command/zipball/2804c5246d9338da59951737b03c54d257be8e47",
6125
+ "reference": "2804c5246d9338da59951737b03c54d257be8e47",
6126
  "shasum": ""
6127
  },
6128
  "require": {
6166
  ],
6167
  "description": "Provides internationalization tools for WordPress projects.",
6168
  "homepage": "https://github.com/wp-cli/i18n-command",
6169
+ "time": "2019-12-13T09:00:43+00:00"
6170
  },
6171
  {
6172
  "name": "wp-cli/import-command",
6694
  },
6695
  {
6696
  "name": "wp-cli/scaffold-command",
6697
+ "version": "v2.0.8",
6698
  "source": {
6699
  "type": "git",
6700
  "url": "https://github.com/wp-cli/scaffold-command.git",
6701
+ "reference": "4814acbdf3d7af499530cc1ae1e82f3ed9f12674"
6702
  },
6703
  "dist": {
6704
  "type": "zip",
6705
+ "url": "https://api.github.com/repos/wp-cli/scaffold-command/zipball/4814acbdf3d7af499530cc1ae1e82f3ed9f12674",
6706
+ "reference": "4814acbdf3d7af499530cc1ae1e82f3ed9f12674",
6707
  "shasum": ""
6708
  },
6709
  "require": {
6753
  ],
6754
  "description": "Generates code for post types, taxonomies, blocks, plugins, child themes, etc.",
6755
  "homepage": "https://github.com/wp-cli/scaffold-command",
6756
+ "time": "2019-11-25T13:26:31+00:00"
6757
  },
6758
  {
6759
  "name": "wp-cli/search-replace-command",
6760
+ "version": "v2.0.6",
6761
  "source": {
6762
  "type": "git",
6763
  "url": "https://github.com/wp-cli/search-replace-command.git",
6764
+ "reference": "f446ca1f90144b496dbacb373868118ba40df028"
6765
  },
6766
  "dist": {
6767
  "type": "zip",
6768
+ "url": "https://api.github.com/repos/wp-cli/search-replace-command/zipball/f446ca1f90144b496dbacb373868118ba40df028",
6769
+ "reference": "f446ca1f90144b496dbacb373868118ba40df028",
6770
  "shasum": ""
6771
  },
6772
  "require": {
6809
  ],
6810
  "description": "Searches/replaces strings in the database.",
6811
  "homepage": "https://github.com/wp-cli/search-replace-command",
6812
+ "time": "2019-12-13T09:13:20+00:00"
6813
  },
6814
  {
6815
  "name": "wp-cli/server-command",
6977
  },
6978
  {
6979
  "name": "wp-cli/widget-command",
6980
+ "version": "v2.1.0",
6981
  "source": {
6982
  "type": "git",
6983
  "url": "https://github.com/wp-cli/widget-command.git",
6984
+ "reference": "ddbc2c3e9966fae8de05a3200b04e0faf42fe06f"
6985
  },
6986
  "dist": {
6987
  "type": "zip",
6988
+ "url": "https://api.github.com/repos/wp-cli/widget-command/zipball/ddbc2c3e9966fae8de05a3200b04e0faf42fe06f",
6989
+ "reference": "ddbc2c3e9966fae8de05a3200b04e0faf42fe06f",
6990
  "shasum": ""
6991
  },
6992
  "require": {
6993
+ "wp-cli/wp-cli": "^2.4"
6994
  },
6995
  "require-dev": {
6996
  "wp-cli/extension-command": "^1.2 || ^2",
7036
  ],
7037
  "description": "Adds, moves, and removes widgets; lists sidebars.",
7038
  "homepage": "https://github.com/wp-cli/widget-command",
7039
+ "time": "2020-01-18T02:17:30+00:00"
7040
  },
7041
  {
7042
  "name": "wp-cli/wp-cli",
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: 3.9.7
7
  * Author: WP Desk
8
  * Author URI: https://www.wpdesk.net/
9
  * Text Domain: flexible-shipping
@@ -11,7 +11,7 @@
11
  * Requires at least: 4.5
12
  * Tested up to: 5.3.2
13
  * WC requires at least: 3.1.0
14
- * WC tested up to: 3.9.1
15
  * Requires PHP: 5.6
16
  *
17
  * Copyright 2017 WP Desk Ltd.
@@ -29,6 +29,7 @@
29
  * You should have received a copy of the GNU General Public License
30
  * along with this program; if not, write to the Free Software
31
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 
32
  * @package Flexible Shipping
33
  */
34
 
@@ -37,8 +38,8 @@ if ( ! defined( 'ABSPATH' ) ) {
37
  } // Exit if accessed directly
38
 
39
  /* THESE TWO VARIABLES CAN BE CHANGED AUTOMATICALLY */
40
- $plugin_version = '3.9.7';
41
- $plugin_release_timestamp = '2020-02-04 09:41';
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: 3.9.9
7
  * Author: WP Desk
8
  * Author URI: https://www.wpdesk.net/
9
  * Text Domain: flexible-shipping
11
  * Requires at least: 4.5
12
  * Tested up to: 5.3.2
13
  * WC requires at least: 3.1.0
14
+ * WC tested up to: 3.9.2
15
  * Requires PHP: 5.6
16
  *
17
  * Copyright 2017 WP Desk Ltd.
29
  * You should have received a copy of the GNU General Public License
30
  * along with this program; if not, write to the Free Software
31
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
32
+ *
33
  * @package Flexible Shipping
34
  */
35
 
38
  } // Exit if accessed directly
39
 
40
  /* THESE TWO VARIABLES CAN BE CHANGED AUTOMATICALLY */
41
+ $plugin_version = '3.9.9';
42
+ $plugin_release_timestamp = '2020-02-17 14:35';
43
 
44
  $plugin_name = 'Flexible Shipping';
45
  $product_id = 'Flexible Shipping';
readme.txt CHANGED
@@ -4,7 +4,7 @@ Donate link: https://flexibleshipping.com/table-rate/
4
  Tags: table rate, table rate shipping, 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
5
  Requires at least: 4.5
6
  Tested up to: 5.3.2
7
- Stable tag: 3.9.7
8
  Requires PHP: 5.6
9
  License: GPLv3 or later
10
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
@@ -175,6 +175,10 @@ If you are upgrading from the old Flexible Shipping version (1.3.2, woo-flexible
175
 
176
  == Changelog ==
177
 
 
 
 
 
178
  = 3.9.7 - 2020-02-04 =
179
  * Fixed import method with existing title
180
 
4
  Tags: table rate, table rate shipping, 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
5
  Requires at least: 4.5
6
  Tested up to: 5.3.2
7
+ Stable tag: 3.9.9
8
  Requires PHP: 5.6
9
  License: GPLv3 or later
10
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
175
 
176
  == Changelog ==
177
 
178
+ = 3.9.9 - 2020-02-17 =
179
+ * Added log messages in WPDesk_Flexible_Shipping_Shipment class.
180
+ * Fixed fatal error in checkout: strongly typed array in woocommerce_shipping_chosen_method filter
181
+
182
  = 3.9.7 - 2020-02-04 =
183
  * Fixed import method with existing title
184
 
vendor/autoload.php CHANGED
@@ -4,4 +4,4 @@
4
 
5
  require_once __DIR__ . '/composer/autoload_real.php';
6
 
7
- return ComposerAutoloaderInit1ce910a8a834ded8da8efb052f563b95::getLoader();
4
 
5
  require_once __DIR__ . '/composer/autoload_real.php';
6
 
7
+ return ComposerAutoloaderInit7841873284f105a308ea8b8843703f31::getLoader();
vendor/composer/autoload_real.php CHANGED
@@ -2,7 +2,7 @@
2
 
3
  // autoload_real.php @generated by Composer
4
 
5
- class ComposerAutoloaderInit1ce910a8a834ded8da8efb052f563b95
6
  {
7
  private static $loader;
8
 
@@ -19,15 +19,15 @@ class ComposerAutoloaderInit1ce910a8a834ded8da8efb052f563b95
19
  return self::$loader;
20
  }
21
 
22
- spl_autoload_register(array('ComposerAutoloaderInit1ce910a8a834ded8da8efb052f563b95', 'loadClassLoader'), true, true);
23
  self::$loader = $loader = new \Composer\Autoload\ClassLoader();
24
- spl_autoload_unregister(array('ComposerAutoloaderInit1ce910a8a834ded8da8efb052f563b95', 'loadClassLoader'));
25
 
26
  $useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
27
  if ($useStaticLoader) {
28
  require_once __DIR__ . '/autoload_static.php';
29
 
30
- call_user_func(\Composer\Autoload\ComposerStaticInit1ce910a8a834ded8da8efb052f563b95::getInitializer($loader));
31
  } else {
32
  $map = require __DIR__ . '/autoload_namespaces.php';
33
  foreach ($map as $namespace => $path) {
2
 
3
  // autoload_real.php @generated by Composer
4
 
5
+ class ComposerAutoloaderInit7841873284f105a308ea8b8843703f31
6
  {
7
  private static $loader;
8
 
19
  return self::$loader;
20
  }
21
 
22
+ spl_autoload_register(array('ComposerAutoloaderInit7841873284f105a308ea8b8843703f31', 'loadClassLoader'), true, true);
23
  self::$loader = $loader = new \Composer\Autoload\ClassLoader();
24
+ spl_autoload_unregister(array('ComposerAutoloaderInit7841873284f105a308ea8b8843703f31', 'loadClassLoader'));
25
 
26
  $useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
27
  if ($useStaticLoader) {
28
  require_once __DIR__ . '/autoload_static.php';
29
 
30
+ call_user_func(\Composer\Autoload\ComposerStaticInit7841873284f105a308ea8b8843703f31::getInitializer($loader));
31
  } else {
32
  $map = require __DIR__ . '/autoload_namespaces.php';
33
  foreach ($map as $namespace => $path) {
vendor/composer/autoload_static.php CHANGED
@@ -4,7 +4,7 @@
4
 
5
  namespace Composer\Autoload;
6
 
7
- class ComposerStaticInit1ce910a8a834ded8da8efb052f563b95
8
  {
9
  public static $prefixLengthsPsr4 = array (
10
  'P' =>
@@ -351,9 +351,9 @@ class ComposerStaticInit1ce910a8a834ded8da8efb052f563b95
351
  public static function getInitializer(ClassLoader $loader)
352
  {
353
  return \Closure::bind(function () use ($loader) {
354
- $loader->prefixLengthsPsr4 = ComposerStaticInit1ce910a8a834ded8da8efb052f563b95::$prefixLengthsPsr4;
355
- $loader->prefixDirsPsr4 = ComposerStaticInit1ce910a8a834ded8da8efb052f563b95::$prefixDirsPsr4;
356
- $loader->classMap = ComposerStaticInit1ce910a8a834ded8da8efb052f563b95::$classMap;
357
 
358
  }, null, ClassLoader::class);
359
  }
4
 
5
  namespace Composer\Autoload;
6
 
7
+ class ComposerStaticInit7841873284f105a308ea8b8843703f31
8
  {
9
  public static $prefixLengthsPsr4 = array (
10
  'P' =>
351
  public static function getInitializer(ClassLoader $loader)
352
  {
353
  return \Closure::bind(function () use ($loader) {
354
+ $loader->prefixLengthsPsr4 = ComposerStaticInit7841873284f105a308ea8b8843703f31::$prefixLengthsPsr4;
355
+ $loader->prefixDirsPsr4 = ComposerStaticInit7841873284f105a308ea8b8843703f31::$prefixDirsPsr4;
356
+ $loader->classMap = ComposerStaticInit7841873284f105a308ea8b8843703f31::$classMap;
357
 
358
  }, null, ClassLoader::class);
359
  }