Version Description
- 2021-03-05 =
- Fixed duplicated shipping methods on old instalations
Download this release
Release Info
Developer | wpdesk |
Plugin | Flexible Shipping for WooCommerce |
Version | 4.1.2 |
Comparing to | |
See all releases |
Code changes from version 4.1.1 to 4.1.2
- classes/table-rate/shipping-method.php +1 -1
- flexible-shipping.php +2 -2
- lang/flexible-shipping.pot +12 -12
- readme.txt +4 -1
- src/WPDesk/FS/TableRate/Rule/Condition/Price.php +9 -8
- src/WPDesk/FS/TableRate/Rule/Condition/Weight.php +9 -8
- vendor/autoload.php +1 -1
- vendor/composer/autoload_real.php +7 -7
- vendor/composer/autoload_static.php +5 -5
classes/table-rate/shipping-method.php
CHANGED
@@ -673,7 +673,7 @@ class WPDesk_Flexible_Shipping extends WC_Shipping_Method {
|
|
673 |
* @return bool
|
674 |
*/
|
675 |
private function is_allowed_support_shipping_zones() {
|
676 |
-
return (bool) apply_filters( 'flexible-shipping/group-method/supports/shipping-zones', false );
|
677 |
}
|
678 |
|
679 |
/**
|
673 |
* @return bool
|
674 |
*/
|
675 |
private function is_allowed_support_shipping_zones() {
|
676 |
+
return ! is_admin() || (bool) apply_filters( 'flexible-shipping/group-method/supports/shipping-zones', false );
|
677 |
}
|
678 |
|
679 |
/**
|
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.1.
|
7 |
* Author: WP Desk
|
8 |
* Author URI: https://flexibleshipping.com/?utm_source=plugin-list&utm_medium=link&utm_campaign=flexible-shipping-plugin-list
|
9 |
* Text Domain: flexible-shipping
|
@@ -38,7 +38,7 @@ if ( ! defined( 'ABSPATH' ) ) {
|
|
38 |
} // Exit if accessed directly
|
39 |
|
40 |
/* THIS VARIABLE CAN BE CHANGED AUTOMATICALLY */
|
41 |
-
$plugin_version = '4.1.
|
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.1.2
|
7 |
* Author: WP Desk
|
8 |
* Author URI: https://flexibleshipping.com/?utm_source=plugin-list&utm_medium=link&utm_campaign=flexible-shipping-plugin-list
|
9 |
* Text Domain: flexible-shipping
|
38 |
} // Exit if accessed directly
|
39 |
|
40 |
/* THIS VARIABLE CAN BE CHANGED AUTOMATICALLY */
|
41 |
+
$plugin_version = '4.1.2';
|
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.1.
|
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-03-
|
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"
|
@@ -1269,31 +1269,31 @@ msgstr ""
|
|
1269 |
msgid "Price"
|
1270 |
msgstr ""
|
1271 |
|
1272 |
-
#: src/WPDesk/FS/TableRate/Rule/Condition/Price.php:
|
1273 |
msgid "price is from"
|
1274 |
msgstr ""
|
1275 |
|
1276 |
-
#: src/WPDesk/FS/TableRate/Rule/Condition/Price.php:
|
1277 |
msgid "min"
|
1278 |
msgstr ""
|
1279 |
|
1280 |
-
#: src/WPDesk/FS/TableRate/Rule/Condition/Price.php:
|
1281 |
-
#: src/WPDesk/FS/TableRate/Rule/Condition/Weight.php:73
|
1282 |
#: src/WPDesk/FS/TableRate/Rule/Condition/Weight.php:74
|
|
|
1283 |
msgid "is from"
|
1284 |
msgstr ""
|
1285 |
|
1286 |
-
#: src/WPDesk/FS/TableRate/Rule/Condition/Price.php:
|
1287 |
msgid "price to"
|
1288 |
msgstr ""
|
1289 |
|
1290 |
-
#: src/WPDesk/FS/TableRate/Rule/Condition/Price.php:
|
1291 |
msgid "max"
|
1292 |
msgstr ""
|
1293 |
|
1294 |
-
#: src/WPDesk/FS/TableRate/Rule/Condition/Price.php:
|
1295 |
-
#: src/WPDesk/FS/TableRate/Rule/Condition/Weight.php:82
|
1296 |
#: src/WPDesk/FS/TableRate/Rule/Condition/Weight.php:83
|
|
|
1297 |
msgid "to"
|
1298 |
msgstr ""
|
1299 |
|
@@ -1303,11 +1303,11 @@ msgstr ""
|
|
1303 |
msgid "Weight"
|
1304 |
msgstr ""
|
1305 |
|
1306 |
-
#: src/WPDesk/FS/TableRate/Rule/Condition/Weight.php:
|
1307 |
msgid "weight is from"
|
1308 |
msgstr ""
|
1309 |
|
1310 |
-
#: src/WPDesk/FS/TableRate/Rule/Condition/Weight.php:
|
1311 |
msgid "weight to"
|
1312 |
msgstr ""
|
1313 |
|
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.1.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-03-05T08:53:02+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"
|
1269 |
msgid "Price"
|
1270 |
msgstr ""
|
1271 |
|
1272 |
+
#: src/WPDesk/FS/TableRate/Rule/Condition/Price.php:75
|
1273 |
msgid "price is from"
|
1274 |
msgstr ""
|
1275 |
|
1276 |
+
#: src/WPDesk/FS/TableRate/Rule/Condition/Price.php:76
|
1277 |
msgid "min"
|
1278 |
msgstr ""
|
1279 |
|
1280 |
+
#: src/WPDesk/FS/TableRate/Rule/Condition/Price.php:77
|
|
|
1281 |
#: src/WPDesk/FS/TableRate/Rule/Condition/Weight.php:74
|
1282 |
+
#: src/WPDesk/FS/TableRate/Rule/Condition/Weight.php:75
|
1283 |
msgid "is from"
|
1284 |
msgstr ""
|
1285 |
|
1286 |
+
#: src/WPDesk/FS/TableRate/Rule/Condition/Price.php:84
|
1287 |
msgid "price to"
|
1288 |
msgstr ""
|
1289 |
|
1290 |
+
#: src/WPDesk/FS/TableRate/Rule/Condition/Price.php:85
|
1291 |
msgid "max"
|
1292 |
msgstr ""
|
1293 |
|
1294 |
+
#: src/WPDesk/FS/TableRate/Rule/Condition/Price.php:86
|
|
|
1295 |
#: src/WPDesk/FS/TableRate/Rule/Condition/Weight.php:83
|
1296 |
+
#: src/WPDesk/FS/TableRate/Rule/Condition/Weight.php:84
|
1297 |
msgid "to"
|
1298 |
msgstr ""
|
1299 |
|
1303 |
msgid "Weight"
|
1304 |
msgstr ""
|
1305 |
|
1306 |
+
#: src/WPDesk/FS/TableRate/Rule/Condition/Weight.php:73
|
1307 |
msgid "weight is from"
|
1308 |
msgstr ""
|
1309 |
|
1310 |
+
#: src/WPDesk/FS/TableRate/Rule/Condition/Weight.php:82
|
1311 |
msgid "weight to"
|
1312 |
msgstr ""
|
1313 |
|
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.7
|
7 |
-
Stable tag: 4.1.
|
8 |
Requires PHP: 7.0
|
9 |
License: GPLv3 or later
|
10 |
License URI: http://www.gnu.org/licenses/gpl-3.0.html
|
@@ -171,6 +171,9 @@ If you are upgrading from the old Flexible Shipping version (1.3.2, woo-flexible
|
|
171 |
|
172 |
== Changelog ==
|
173 |
|
|
|
|
|
|
|
174 |
= 4.1.1 - 2021-03-04 =
|
175 |
* Added conditions input data filters: flexible-shipping/condition/contents_value and flexible-shipping/condition/contents_weight
|
176 |
* Added selling box on Flexible Shipping Method
|
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.7
|
7 |
+
Stable tag: 4.1.2
|
8 |
Requires PHP: 7.0
|
9 |
License: GPLv3 or later
|
10 |
License URI: http://www.gnu.org/licenses/gpl-3.0.html
|
171 |
|
172 |
== Changelog ==
|
173 |
|
174 |
+
= 4.1.2 - 2021-03-05 =
|
175 |
+
* Fixed duplicated shipping methods on old instalations
|
176 |
+
|
177 |
= 4.1.1 - 2021-03-04 =
|
178 |
* Added conditions input data filters: flexible-shipping/condition/contents_value and flexible-shipping/condition/contents_weight
|
179 |
* Added selling box on Flexible Shipping Method
|
src/WPDesk/FS/TableRate/Rule/Condition/Price.php
CHANGED
@@ -45,14 +45,15 @@ class Price extends AbstractCondition {
|
|
45 |
$min = (float) apply_filters( 'flexible_shipping_value_in_currency', $min );
|
46 |
$max = (float) apply_filters( 'flexible_shipping_value_in_currency', $max );
|
47 |
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
|
|
56 |
|
57 |
$condition_matched = $contents_cost >= $min && $contents_cost <= $max;
|
58 |
|
45 |
$min = (float) apply_filters( 'flexible_shipping_value_in_currency', $min );
|
46 |
$max = (float) apply_filters( 'flexible_shipping_value_in_currency', $max );
|
47 |
|
48 |
+
$contents_cost =
|
49 |
+
/**
|
50 |
+
* Can modify contents cost passed to Price (value) condition.
|
51 |
+
*
|
52 |
+
* @param float $contents_cost Contents cost.
|
53 |
+
*
|
54 |
+
* @since 4.1.1
|
55 |
+
*/
|
56 |
+
(float) apply_filters( 'flexible-shipping/condition/contents_value', $contents->get_contents_cost() );
|
57 |
|
58 |
$condition_matched = $contents_cost >= $min && $contents_cost <= $max;
|
59 |
|
src/WPDesk/FS/TableRate/Rule/Condition/Weight.php
CHANGED
@@ -43,14 +43,15 @@ class Weight extends AbstractCondition {
|
|
43 |
$min = (float) ( isset( $condition_settings[ self::MIN ] ) && 0 !== strlen( $condition_settings[ self::MIN ] ) ? $condition_settings[ self::MIN ] : 0 );
|
44 |
$max = (float) ( isset( $condition_settings[ self::MAX ] ) && 0 !== strlen( $condition_settings[ self::MAX ] ) ? $condition_settings[ self::MAX ] : INF );
|
45 |
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
|
|
54 |
|
55 |
$condition_matched = $contents_weight >= $min && $contents_weight <= $max;
|
56 |
|
43 |
$min = (float) ( isset( $condition_settings[ self::MIN ] ) && 0 !== strlen( $condition_settings[ self::MIN ] ) ? $condition_settings[ self::MIN ] : 0 );
|
44 |
$max = (float) ( isset( $condition_settings[ self::MAX ] ) && 0 !== strlen( $condition_settings[ self::MAX ] ) ? $condition_settings[ self::MAX ] : INF );
|
45 |
|
46 |
+
$contents_weight =
|
47 |
+
/**
|
48 |
+
* Can modify contents weight passed to Weight condition.
|
49 |
+
*
|
50 |
+
* @param float $contents_weight Contents weight.
|
51 |
+
*
|
52 |
+
* @since 4.1.1
|
53 |
+
*/
|
54 |
+
(float) apply_filters( 'flexible-shipping/condition/contents_weight', $contents->get_contents_weight() );
|
55 |
|
56 |
$condition_matched = $contents_weight >= $min && $contents_weight <= $max;
|
57 |
|
vendor/autoload.php
CHANGED
@@ -4,4 +4,4 @@
|
|
4 |
|
5 |
require_once __DIR__ . '/composer/autoload_real.php';
|
6 |
|
7 |
-
return
|
4 |
|
5 |
require_once __DIR__ . '/composer/autoload_real.php';
|
6 |
|
7 |
+
return ComposerAutoloaderInit9f0efa596fc32b6c7dfa06e478b82bf8::getLoader();
|
vendor/composer/autoload_real.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
|
3 |
// autoload_real.php @generated by Composer
|
4 |
|
5 |
-
class
|
6 |
{
|
7 |
private static $loader;
|
8 |
|
@@ -19,15 +19,15 @@ class ComposerAutoloaderInit130b57dd66441d9ff43137870963e368
|
|
19 |
return self::$loader;
|
20 |
}
|
21 |
|
22 |
-
spl_autoload_register(array('
|
23 |
self::$loader = $loader = new \Composer\Autoload\ClassLoader();
|
24 |
-
spl_autoload_unregister(array('
|
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\
|
31 |
} else {
|
32 |
$map = require __DIR__ . '/autoload_namespaces.php';
|
33 |
foreach ($map as $namespace => $path) {
|
@@ -48,19 +48,19 @@ class ComposerAutoloaderInit130b57dd66441d9ff43137870963e368
|
|
48 |
$loader->register(true);
|
49 |
|
50 |
if ($useStaticLoader) {
|
51 |
-
$includeFiles = Composer\Autoload\
|
52 |
} else {
|
53 |
$includeFiles = require __DIR__ . '/autoload_files.php';
|
54 |
}
|
55 |
foreach ($includeFiles as $fileIdentifier => $file) {
|
56 |
-
|
57 |
}
|
58 |
|
59 |
return $loader;
|
60 |
}
|
61 |
}
|
62 |
|
63 |
-
function
|
64 |
{
|
65 |
if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
|
66 |
require $file;
|
2 |
|
3 |
// autoload_real.php @generated by Composer
|
4 |
|
5 |
+
class ComposerAutoloaderInit9f0efa596fc32b6c7dfa06e478b82bf8
|
6 |
{
|
7 |
private static $loader;
|
8 |
|
19 |
return self::$loader;
|
20 |
}
|
21 |
|
22 |
+
spl_autoload_register(array('ComposerAutoloaderInit9f0efa596fc32b6c7dfa06e478b82bf8', 'loadClassLoader'), true, true);
|
23 |
self::$loader = $loader = new \Composer\Autoload\ClassLoader();
|
24 |
+
spl_autoload_unregister(array('ComposerAutoloaderInit9f0efa596fc32b6c7dfa06e478b82bf8', '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\ComposerStaticInit9f0efa596fc32b6c7dfa06e478b82bf8::getInitializer($loader));
|
31 |
} else {
|
32 |
$map = require __DIR__ . '/autoload_namespaces.php';
|
33 |
foreach ($map as $namespace => $path) {
|
48 |
$loader->register(true);
|
49 |
|
50 |
if ($useStaticLoader) {
|
51 |
+
$includeFiles = Composer\Autoload\ComposerStaticInit9f0efa596fc32b6c7dfa06e478b82bf8::$files;
|
52 |
} else {
|
53 |
$includeFiles = require __DIR__ . '/autoload_files.php';
|
54 |
}
|
55 |
foreach ($includeFiles as $fileIdentifier => $file) {
|
56 |
+
composerRequire9f0efa596fc32b6c7dfa06e478b82bf8($fileIdentifier, $file);
|
57 |
}
|
58 |
|
59 |
return $loader;
|
60 |
}
|
61 |
}
|
62 |
|
63 |
+
function composerRequire9f0efa596fc32b6c7dfa06e478b82bf8($fileIdentifier, $file)
|
64 |
{
|
65 |
if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
|
66 |
require $file;
|
vendor/composer/autoload_static.php
CHANGED
@@ -4,7 +4,7 @@
|
|
4 |
|
5 |
namespace Composer\Autoload;
|
6 |
|
7 |
-
class
|
8 |
{
|
9 |
public static $files = array (
|
10 |
'0509b34a4bd7aebefeac629c9dc8a978' => __DIR__ . '/..' . '/wpdesk/wp-notice/src/WPDesk/notice-functions.php',
|
@@ -617,10 +617,10 @@ class ComposerStaticInit130b57dd66441d9ff43137870963e368
|
|
617 |
public static function getInitializer(ClassLoader $loader)
|
618 |
{
|
619 |
return \Closure::bind(function () use ($loader) {
|
620 |
-
$loader->prefixLengthsPsr4 =
|
621 |
-
$loader->prefixDirsPsr4 =
|
622 |
-
$loader->fallbackDirsPsr4 =
|
623 |
-
$loader->classMap =
|
624 |
|
625 |
}, null, ClassLoader::class);
|
626 |
}
|
4 |
|
5 |
namespace Composer\Autoload;
|
6 |
|
7 |
+
class ComposerStaticInit9f0efa596fc32b6c7dfa06e478b82bf8
|
8 |
{
|
9 |
public static $files = array (
|
10 |
'0509b34a4bd7aebefeac629c9dc8a978' => __DIR__ . '/..' . '/wpdesk/wp-notice/src/WPDesk/notice-functions.php',
|
617 |
public static function getInitializer(ClassLoader $loader)
|
618 |
{
|
619 |
return \Closure::bind(function () use ($loader) {
|
620 |
+
$loader->prefixLengthsPsr4 = ComposerStaticInit9f0efa596fc32b6c7dfa06e478b82bf8::$prefixLengthsPsr4;
|
621 |
+
$loader->prefixDirsPsr4 = ComposerStaticInit9f0efa596fc32b6c7dfa06e478b82bf8::$prefixDirsPsr4;
|
622 |
+
$loader->fallbackDirsPsr4 = ComposerStaticInit9f0efa596fc32b6c7dfa06e478b82bf8::$fallbackDirsPsr4;
|
623 |
+
$loader->classMap = ComposerStaticInit9f0efa596fc32b6c7dfa06e478b82bf8::$classMap;
|
624 |
|
625 |
}, null, ClassLoader::class);
|
626 |
}
|