Flexible Shipping for WooCommerce - Version 4.7.1

Version Description

  • 2021-07-22 =
  • Fixed fatal error on subscription renewal
Download this release

Release Info

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

Code changes from version 4.7.0 to 4.7.1

flexible-shipping.php CHANGED
@@ -3,15 +3,15 @@
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.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
10
  * Domain Path: /lang/
11
  * Requires at least: 5.2
12
- * Tested up to: 5.8
13
  * WC requires at least: 5.2
14
- * WC tested up to: 5.5
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.0';
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.7.1
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
10
  * Domain Path: /lang/
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
  } // Exit if accessed directly
39
 
40
  /* THIS VARIABLE CAN BE CHANGED AUTOMATICALLY */
41
+ $plugin_version = '4.7.1';
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.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-07-20T07:59:43+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"
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.1\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-07-22T11:03:58+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"
readme.txt CHANGED
@@ -3,8 +3,8 @@ Contributors: wpdesk,dyszczo,grola,piotrpo,marcinkolanko,mateuszgbiorczyk,sebast
3
  Donate link: https://flexibleshipping.com/products/flexible-shipping-pro-woocommerce/?utm_source=wordpress&utm_medium=link&utm_campaign=wordpress
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.8
7
- Stable tag: 4.7.0
8
  Requires PHP: 7.0
9
  License: GPLv3 or later
10
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
@@ -199,6 +199,9 @@ If you are upgrading from the old Flexible Shipping version (1.3.2, woo-flexible
199
 
200
  == Changelog ==
201
 
 
 
 
202
  = 4.7.0 - 2021-07-20 =
203
  * Changed functionality for shipping integrations: DPD UK, InPost and others
204
  * Fixed free shipping label when negative cost calculated and set as 0 (zero)
3
  Donate link: https://flexibleshipping.com/products/flexible-shipping-pro-woocommerce/?utm_source=wordpress&utm_medium=link&utm_campaign=wordpress
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.1
8
  Requires PHP: 7.0
9
  License: GPLv3 or later
10
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
199
 
200
  == Changelog ==
201
 
202
+ = 4.7.1 - 2021-07-22 =
203
+ * Fixed fatal error on subscription renewal
204
+
205
  = 4.7.0 - 2021-07-20 =
206
  * Changed functionality for shipping integrations: DPD UK, InPost and others
207
  * Fixed free shipping label when negative cost calculated and set as 0 (zero)
vendor/autoload.php CHANGED
@@ -4,4 +4,4 @@
4
 
5
  require_once __DIR__ . '/composer/autoload_real.php';
6
 
7
- return ComposerAutoloaderInite6a0a8b5b22ff56576b816fc78d3ff4e::getLoader();
4
 
5
  require_once __DIR__ . '/composer/autoload_real.php';
6
 
7
+ return ComposerAutoloaderInitd80a5fc258fa7938e46dcc173a2748b4::getLoader();
vendor/composer/autoload_real.php CHANGED
@@ -2,7 +2,7 @@
2
 
3
  // autoload_real.php @generated by Composer
4
 
5
- class ComposerAutoloaderInite6a0a8b5b22ff56576b816fc78d3ff4e
6
  {
7
  private static $loader;
8
 
@@ -22,15 +22,15 @@ class ComposerAutoloaderInite6a0a8b5b22ff56576b816fc78d3ff4e
22
  return self::$loader;
23
  }
24
 
25
- spl_autoload_register(array('ComposerAutoloaderInite6a0a8b5b22ff56576b816fc78d3ff4e', 'loadClassLoader'), true, true);
26
  self::$loader = $loader = new \Composer\Autoload\ClassLoader();
27
- spl_autoload_unregister(array('ComposerAutoloaderInite6a0a8b5b22ff56576b816fc78d3ff4e', '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\ComposerStaticInite6a0a8b5b22ff56576b816fc78d3ff4e::getInitializer($loader));
34
  } else {
35
  $map = require __DIR__ . '/autoload_namespaces.php';
36
  foreach ($map as $namespace => $path) {
@@ -51,19 +51,19 @@ class ComposerAutoloaderInite6a0a8b5b22ff56576b816fc78d3ff4e
51
  $loader->register(true);
52
 
53
  if ($useStaticLoader) {
54
- $includeFiles = Composer\Autoload\ComposerStaticInite6a0a8b5b22ff56576b816fc78d3ff4e::$files;
55
  } else {
56
  $includeFiles = require __DIR__ . '/autoload_files.php';
57
  }
58
  foreach ($includeFiles as $fileIdentifier => $file) {
59
- composerRequiree6a0a8b5b22ff56576b816fc78d3ff4e($fileIdentifier, $file);
60
  }
61
 
62
  return $loader;
63
  }
64
  }
65
 
66
- function composerRequiree6a0a8b5b22ff56576b816fc78d3ff4e($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 ComposerAutoloaderInitd80a5fc258fa7938e46dcc173a2748b4
6
  {
7
  private static $loader;
8
 
22
  return self::$loader;
23
  }
24
 
25
+ spl_autoload_register(array('ComposerAutoloaderInitd80a5fc258fa7938e46dcc173a2748b4', 'loadClassLoader'), true, true);
26
  self::$loader = $loader = new \Composer\Autoload\ClassLoader();
27
+ spl_autoload_unregister(array('ComposerAutoloaderInitd80a5fc258fa7938e46dcc173a2748b4', '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\ComposerStaticInitd80a5fc258fa7938e46dcc173a2748b4::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\ComposerStaticInitd80a5fc258fa7938e46dcc173a2748b4::$files;
55
  } else {
56
  $includeFiles = require __DIR__ . '/autoload_files.php';
57
  }
58
  foreach ($includeFiles as $fileIdentifier => $file) {
59
+ composerRequired80a5fc258fa7938e46dcc173a2748b4($fileIdentifier, $file);
60
  }
61
 
62
  return $loader;
63
  }
64
  }
65
 
66
+ function composerRequired80a5fc258fa7938e46dcc173a2748b4($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 ComposerStaticInite6a0a8b5b22ff56576b816fc78d3ff4e
8
  {
9
  public static $files = array (
10
  '0509b34a4bd7aebefeac629c9dc8a978' => __DIR__ . '/..' . '/wpdesk/wp-notice/src/WPDesk/notice-functions.php',
@@ -674,10 +674,10 @@ class ComposerStaticInite6a0a8b5b22ff56576b816fc78d3ff4e
674
  public static function getInitializer(ClassLoader $loader)
675
  {
676
  return \Closure::bind(function () use ($loader) {
677
- $loader->prefixLengthsPsr4 = ComposerStaticInite6a0a8b5b22ff56576b816fc78d3ff4e::$prefixLengthsPsr4;
678
- $loader->prefixDirsPsr4 = ComposerStaticInite6a0a8b5b22ff56576b816fc78d3ff4e::$prefixDirsPsr4;
679
- $loader->fallbackDirsPsr4 = ComposerStaticInite6a0a8b5b22ff56576b816fc78d3ff4e::$fallbackDirsPsr4;
680
- $loader->classMap = ComposerStaticInite6a0a8b5b22ff56576b816fc78d3ff4e::$classMap;
681
 
682
  }, null, ClassLoader::class);
683
  }
4
 
5
  namespace Composer\Autoload;
6
 
7
+ class ComposerStaticInitd80a5fc258fa7938e46dcc173a2748b4
8
  {
9
  public static $files = array (
10
  '0509b34a4bd7aebefeac629c9dc8a978' => __DIR__ . '/..' . '/wpdesk/wp-notice/src/WPDesk/notice-functions.php',
674
  public static function getInitializer(ClassLoader $loader)
675
  {
676
  return \Closure::bind(function () use ($loader) {
677
+ $loader->prefixLengthsPsr4 = ComposerStaticInitd80a5fc258fa7938e46dcc173a2748b4::$prefixLengthsPsr4;
678
+ $loader->prefixDirsPsr4 = ComposerStaticInitd80a5fc258fa7938e46dcc173a2748b4::$prefixDirsPsr4;
679
+ $loader->fallbackDirsPsr4 = ComposerStaticInitd80a5fc258fa7938e46dcc173a2748b4::$fallbackDirsPsr4;
680
+ $loader->classMap = ComposerStaticInitd80a5fc258fa7938e46dcc173a2748b4::$classMap;
681
 
682
  }, null, ClassLoader::class);
683
  }
vendor_prefixed/wpdesk/wp-wpdesk-fs-shipment/src/WPDesk/FS/Shipment/Subscriptions/SubscriptionsIntegration.php CHANGED
@@ -8,14 +8,7 @@
8
  namespace FSVendor\WPDesk\FS\Shipment\Subscriptions;
9
 
10
  use FSVendor\WPDesk\FS\Shipment\CustomPostType;
11
- use FSVendor\WPDesk\FS\Shipment\WPDesk_Flexible_Shipping_Shipment;
12
  use FSVendor\WPDesk\PluginBuilder\Plugin\Hookable;
13
- use function add_action;
14
- use function add_filter;
15
- use function apply_filters;
16
- use function do_action;
17
- use function FSVendor\fs_create_shipment;
18
- use function FSVendor\fs_get_order_shipments;
19
  /**
20
  * Integrates Shipments with WooCommerce Subscriptions plugin.
21
  */
@@ -58,7 +51,7 @@ class SubscriptionsIntegration implements \FSVendor\WPDesk\PluginBuilder\Plugin\
58
  */
59
  public function create_shipping_for_order_from_subscription($order, $subscription)
60
  {
61
- $subscription_shipments = \FSVendor\fs_get_order_shipments($subscription->get_id());
62
  foreach ($subscription_shipments as $shipment) {
63
  $this->create_single_shipment($shipment, $order);
64
  }
@@ -72,14 +65,14 @@ class SubscriptionsIntegration implements \FSVendor\WPDesk\PluginBuilder\Plugin\
72
  {
73
  $meta_data = $shipment->get_meta_data();
74
  $fs_method = $shipment->get_meta('_fs_method', array('method_integration' => $shipment->get_integration()));
75
- $order_shipment = \FSVendor\fs_create_shipment($order, $fs_method);
76
  $integration = $order_shipment->get_integration();
77
  $this->setup_shipment_meta_data($meta_data, $integration, $shipment, $order_shipment);
78
  $order_shipment->save();
79
  /**
80
  * New shipment created from subscription.
81
  *
82
- * @param WPDesk_Flexible_Shipping_Shipment $order_shipment Created shipment.
83
  */
84
  \do_action('flexible-shipping/shipment-from-subscription/created/' . $integration, $order_shipment);
85
  }
8
  namespace FSVendor\WPDesk\FS\Shipment\Subscriptions;
9
 
10
  use FSVendor\WPDesk\FS\Shipment\CustomPostType;
 
11
  use FSVendor\WPDesk\PluginBuilder\Plugin\Hookable;
 
 
 
 
 
 
12
  /**
13
  * Integrates Shipments with WooCommerce Subscriptions plugin.
14
  */
51
  */
52
  public function create_shipping_for_order_from_subscription($order, $subscription)
53
  {
54
+ $subscription_shipments = fs_get_order_shipments($subscription->get_id());
55
  foreach ($subscription_shipments as $shipment) {
56
  $this->create_single_shipment($shipment, $order);
57
  }
65
  {
66
  $meta_data = $shipment->get_meta_data();
67
  $fs_method = $shipment->get_meta('_fs_method', array('method_integration' => $shipment->get_integration()));
68
+ $order_shipment = fs_create_shipment($order, $fs_method);
69
  $integration = $order_shipment->get_integration();
70
  $this->setup_shipment_meta_data($meta_data, $integration, $shipment, $order_shipment);
71
  $order_shipment->save();
72
  /**
73
  * New shipment created from subscription.
74
  *
75
+ * @param \WPDesk_Flexible_Shipping_Shipment $order_shipment Created shipment.
76
  */
77
  \do_action('flexible-shipping/shipment-from-subscription/created/' . $integration, $order_shipment);
78
  }