Version Description
- 2020-01-03 =
- Added flexible_shipping_is_free_shipping filter
Download this release
Release Info
Developer | wpdesk |
Plugin | Flexible Shipping for WooCommerce |
Version | 3.9.6 |
Comparing to | |
See all releases |
Code changes from version 3.9.5 to 3.9.6
- classes/table-rate/shipping-method.php +14 -4
- flexible-shipping.php +2 -2
- readme.txt +4 -1
- vendor/autoload.php +1 -1
- vendor/composer/autoload_real.php +4 -4
- vendor/composer/autoload_static.php +4 -4
classes/table-rate/shipping-method.php
CHANGED
@@ -63,7 +63,7 @@ if ( ! class_exists( 'WPDesk_Flexible_Shipping' ) ) {
|
|
63 |
|
64 |
$this->init();
|
65 |
|
66 |
-
|
67 |
//$this->method_title = $this->get_option( 'title' );
|
68 |
|
69 |
//add_action( 'woocommerce_sections_' . $this->id, array( $this, 'process_admin_options' ) );
|
@@ -640,15 +640,25 @@ if ( ! class_exists( 'WPDesk_Flexible_Shipping' ) ) {
|
|
640 |
* @return bool
|
641 |
*/
|
642 |
public function is_free_shipping( array $shipping_method_settings, $cart_contents_cost ) {
|
|
|
643 |
if ( isset( $shipping_method_settings[ self::FIELD_METHOD_FREE_SHIPPING ] ) && '' !== $shipping_method_settings[ self::FIELD_METHOD_FREE_SHIPPING ] ) {
|
644 |
$shipping_method_settings[self::FIELD_METHOD_FREE_SHIPPING] = trim( $shipping_method_settings[self::FIELD_METHOD_FREE_SHIPPING] );
|
645 |
if ( '0' !== $shipping_method_settings[self::FIELD_METHOD_FREE_SHIPPING] && is_numeric( $shipping_method_settings[self::FIELD_METHOD_FREE_SHIPPING] ) ) {
|
646 |
if ( apply_filters( 'flexible_shipping_value_in_currency', floatval( $shipping_method_settings[self::FIELD_METHOD_FREE_SHIPPING] ) ) <= floatval( $cart_contents_cost ) ) {
|
647 |
-
|
648 |
}
|
649 |
}
|
650 |
}
|
651 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
652 |
}
|
653 |
|
654 |
/**
|
@@ -858,7 +868,7 @@ if ( ! class_exists( 'WPDesk_Flexible_Shipping' ) ) {
|
|
858 |
$data = wp_parse_args( $data, $defaults );
|
859 |
return sprintf( '<tr><td></td><td><span class="%1$s" id="%2$s">%3$s</span></td></tr>', esc_attr( $data['class'] ), esc_attr( $field_key ), $data['description'] );
|
860 |
}
|
861 |
-
|
862 |
/**
|
863 |
* Generate custom_services field HTML.
|
864 |
*
|
63 |
|
64 |
$this->init();
|
65 |
|
66 |
+
|
67 |
//$this->method_title = $this->get_option( 'title' );
|
68 |
|
69 |
//add_action( 'woocommerce_sections_' . $this->id, array( $this, 'process_admin_options' ) );
|
640 |
* @return bool
|
641 |
*/
|
642 |
public function is_free_shipping( array $shipping_method_settings, $cart_contents_cost ) {
|
643 |
+
$is_free_shipping = false;
|
644 |
if ( isset( $shipping_method_settings[ self::FIELD_METHOD_FREE_SHIPPING ] ) && '' !== $shipping_method_settings[ self::FIELD_METHOD_FREE_SHIPPING ] ) {
|
645 |
$shipping_method_settings[self::FIELD_METHOD_FREE_SHIPPING] = trim( $shipping_method_settings[self::FIELD_METHOD_FREE_SHIPPING] );
|
646 |
if ( '0' !== $shipping_method_settings[self::FIELD_METHOD_FREE_SHIPPING] && is_numeric( $shipping_method_settings[self::FIELD_METHOD_FREE_SHIPPING] ) ) {
|
647 |
if ( apply_filters( 'flexible_shipping_value_in_currency', floatval( $shipping_method_settings[self::FIELD_METHOD_FREE_SHIPPING] ) ) <= floatval( $cart_contents_cost ) ) {
|
648 |
+
$is_free_shipping = true;
|
649 |
}
|
650 |
}
|
651 |
}
|
652 |
+
/**
|
653 |
+
* Can modify free shipping.
|
654 |
+
*
|
655 |
+
* @param bool $is_free_shipping Current is_free_shipping value based on method settings.
|
656 |
+
* @param array $shipping_method_settings Flexible shipping method settings.
|
657 |
+
* @param float $cart_contents_cost Cart contents cost.
|
658 |
+
*
|
659 |
+
* @return bool
|
660 |
+
*/
|
661 |
+
return apply_filters( 'flexible_shipping_is_free_shipping', $is_free_shipping, $shipping_method_settings, $cart_contents_cost );
|
662 |
}
|
663 |
|
664 |
/**
|
868 |
$data = wp_parse_args( $data, $defaults );
|
869 |
return sprintf( '<tr><td></td><td><span class="%1$s" id="%2$s">%3$s</span></td></tr>', esc_attr( $data['class'] ), esc_attr( $field_key ), $data['description'] );
|
870 |
}
|
871 |
+
|
872 |
/**
|
873 |
* Generate custom_services field HTML.
|
874 |
*
|
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 |
* Author: WP Desk
|
8 |
* Author URI: https://www.wpdesk.net/
|
9 |
* Text Domain: flexible-shipping
|
@@ -37,7 +37,7 @@ if ( ! defined( 'ABSPATH' ) ) {
|
|
37 |
} // Exit if accessed directly
|
38 |
|
39 |
/* THESE TWO VARIABLES CAN BE CHANGED AUTOMATICALLY */
|
40 |
-
$plugin_version = '3.9.
|
41 |
$plugin_release_timestamp = '2020-01-03 11:16';
|
42 |
|
43 |
$plugin_name = '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.6
|
7 |
* Author: WP Desk
|
8 |
* Author URI: https://www.wpdesk.net/
|
9 |
* Text Domain: flexible-shipping
|
37 |
} // Exit if accessed directly
|
38 |
|
39 |
/* THESE TWO VARIABLES CAN BE CHANGED AUTOMATICALLY */
|
40 |
+
$plugin_version = '3.9.6';
|
41 |
$plugin_release_timestamp = '2020-01-03 11:16';
|
42 |
|
43 |
$plugin_name = '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.
|
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,9 @@ If you are upgrading from the old Flexible Shipping version (1.3.2, woo-flexible
|
|
175 |
|
176 |
== Changelog ==
|
177 |
|
|
|
|
|
|
|
178 |
= 3.9.5 - 2020-01-03 =
|
179 |
* Added support for WooCommerce 3.9
|
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.6
|
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.6 - 2020-01-03 =
|
179 |
+
* Added flexible_shipping_is_free_shipping filter
|
180 |
+
|
181 |
= 3.9.5 - 2020-01-03 =
|
182 |
* Added support for WooCommerce 3.9
|
183 |
|
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 ComposerAutoloaderInit2a5b522b05ac854427228ef91e23bced::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 ComposerAutoloaderInit1a09ecba3f89686934396722a633b876
|
|
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) {
|
2 |
|
3 |
// autoload_real.php @generated by Composer
|
4 |
|
5 |
+
class ComposerAutoloaderInit2a5b522b05ac854427228ef91e23bced
|
6 |
{
|
7 |
private static $loader;
|
8 |
|
19 |
return self::$loader;
|
20 |
}
|
21 |
|
22 |
+
spl_autoload_register(array('ComposerAutoloaderInit2a5b522b05ac854427228ef91e23bced', 'loadClassLoader'), true, true);
|
23 |
self::$loader = $loader = new \Composer\Autoload\ClassLoader();
|
24 |
+
spl_autoload_unregister(array('ComposerAutoloaderInit2a5b522b05ac854427228ef91e23bced', '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\ComposerStaticInit2a5b522b05ac854427228ef91e23bced::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
|
8 |
{
|
9 |
public static $prefixLengthsPsr4 = array (
|
10 |
'P' =>
|
@@ -349,9 +349,9 @@ class ComposerStaticInit1a09ecba3f89686934396722a633b876
|
|
349 |
public static function getInitializer(ClassLoader $loader)
|
350 |
{
|
351 |
return \Closure::bind(function () use ($loader) {
|
352 |
-
$loader->prefixLengthsPsr4 =
|
353 |
-
$loader->prefixDirsPsr4 =
|
354 |
-
$loader->classMap =
|
355 |
|
356 |
}, null, ClassLoader::class);
|
357 |
}
|
4 |
|
5 |
namespace Composer\Autoload;
|
6 |
|
7 |
+
class ComposerStaticInit2a5b522b05ac854427228ef91e23bced
|
8 |
{
|
9 |
public static $prefixLengthsPsr4 = array (
|
10 |
'P' =>
|
349 |
public static function getInitializer(ClassLoader $loader)
|
350 |
{
|
351 |
return \Closure::bind(function () use ($loader) {
|
352 |
+
$loader->prefixLengthsPsr4 = ComposerStaticInit2a5b522b05ac854427228ef91e23bced::$prefixLengthsPsr4;
|
353 |
+
$loader->prefixDirsPsr4 = ComposerStaticInit2a5b522b05ac854427228ef91e23bced::$prefixDirsPsr4;
|
354 |
+
$loader->classMap = ComposerStaticInit2a5b522b05ac854427228ef91e23bced::$classMap;
|
355 |
|
356 |
}, null, ClassLoader::class);
|
357 |
}
|