Version Description
- 2019-05-22 =
- Added new filter wpdesk_is_wp_log_capture_permitted
Download this release
Release Info
Developer | jablonowski |
Plugin | Flexible Shipping for WooCommerce |
Version | 3.4.0 |
Comparing to | |
See all releases |
Code changes from version 3.3.14 to 3.4.0
- classes/logger/class-logger-factory.php +8 -7
- composer.lock +6 -6
- flexible-shipping.php +4 -4
- readme.txt +8 -2
- vendor/autoload.php +1 -1
- vendor/composer/autoload_real.php +7 -7
- vendor/composer/autoload_static.php +4 -4
- vendor/composer/installed.json +6 -6
- vendor/wpdesk/wp-logs/CHANGELOG.md +4 -0
- vendor/wpdesk/wp-logs/src/WPDeskLoggerFactory.php +13 -1
classes/logger/class-logger-factory.php
CHANGED
@@ -4,6 +4,7 @@
|
|
4 |
* Class WPDesk_Flexible_Shipping_Logger_Factory
|
5 |
*/
|
6 |
class WPDesk_Flexible_Shipping_Logger_Factory {
|
|
|
7 |
|
8 |
/**
|
9 |
* Logger.
|
@@ -21,13 +22,13 @@ class WPDesk_Flexible_Shipping_Logger_Factory {
|
|
21 |
if ( null === self::$logger ) {
|
22 |
$logger_settings = new WPDesk_Flexible_Shipping_SaaS_Logger_Settings();
|
23 |
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
\
|
31 |
}
|
32 |
}
|
33 |
return self::$logger;
|
4 |
* Class WPDesk_Flexible_Shipping_Logger_Factory
|
5 |
*/
|
6 |
class WPDesk_Flexible_Shipping_Logger_Factory {
|
7 |
+
const NULL_LOG_NAME = 'null-log';
|
8 |
|
9 |
/**
|
10 |
* Logger.
|
22 |
if ( null === self::$logger ) {
|
23 |
$logger_settings = new WPDesk_Flexible_Shipping_SaaS_Logger_Settings();
|
24 |
|
25 |
+
if ( $logger_settings->is_enabled() ) {
|
26 |
+
self::$logger = new WPDesk_Flexible_Shipping_WooCommerce_Context_Logger(
|
27 |
+
@\WPDesk\Logger\LoggerFacade::get_logger( $logger_settings->get_logger_channel_name() ),
|
28 |
+
$logger_settings->get_logging_context()
|
29 |
+
);
|
30 |
+
} else {
|
31 |
+
self::$logger = new \Monolog\Logger( self::NULL_LOG_NAME );
|
32 |
}
|
33 |
}
|
34 |
return self::$logger;
|
composer.lock
CHANGED
@@ -4,7 +4,7 @@
|
|
4 |
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file",
|
5 |
"This file is @generated automatically"
|
6 |
],
|
7 |
-
"content-hash": "
|
8 |
"packages": [
|
9 |
{
|
10 |
"name": "moneyphp/money",
|
@@ -416,16 +416,16 @@
|
|
416 |
},
|
417 |
{
|
418 |
"name": "wpdesk/wp-logs",
|
419 |
-
"version": "1.
|
420 |
"source": {
|
421 |
"type": "git",
|
422 |
"url": "https://gitlab.com/wpdesk/wp-logs.git",
|
423 |
-
"reference": "
|
424 |
},
|
425 |
"dist": {
|
426 |
"type": "zip",
|
427 |
-
"url": "https://gitlab.com/api/v4/projects/wpdesk%2Fwp-logs/repository/archive.zip?sha=
|
428 |
-
"reference": "
|
429 |
"shasum": ""
|
430 |
},
|
431 |
"require": {
|
@@ -456,7 +456,7 @@
|
|
456 |
"email": "krzysiek@wpdesk.pl"
|
457 |
}
|
458 |
],
|
459 |
-
"time": "2019-05-
|
460 |
},
|
461 |
{
|
462 |
"name": "wpdesk/wp-mutex",
|
4 |
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file",
|
5 |
"This file is @generated automatically"
|
6 |
],
|
7 |
+
"content-hash": "f43684595701baf314af63c333c3163d",
|
8 |
"packages": [
|
9 |
{
|
10 |
"name": "moneyphp/money",
|
416 |
},
|
417 |
{
|
418 |
"name": "wpdesk/wp-logs",
|
419 |
+
"version": "1.6.0",
|
420 |
"source": {
|
421 |
"type": "git",
|
422 |
"url": "https://gitlab.com/wpdesk/wp-logs.git",
|
423 |
+
"reference": "e16ede8850423f6893ab8537db7f321d97734963"
|
424 |
},
|
425 |
"dist": {
|
426 |
"type": "zip",
|
427 |
+
"url": "https://gitlab.com/api/v4/projects/wpdesk%2Fwp-logs/repository/archive.zip?sha=e16ede8850423f6893ab8537db7f321d97734963",
|
428 |
+
"reference": "e16ede8850423f6893ab8537db7f321d97734963",
|
429 |
"shasum": ""
|
430 |
},
|
431 |
"require": {
|
456 |
"email": "krzysiek@wpdesk.pl"
|
457 |
}
|
458 |
],
|
459 |
+
"time": "2019-05-22T16:24:23+00:00"
|
460 |
},
|
461 |
{
|
462 |
"name": "wpdesk/wp-mutex",
|
flexible-shipping.php
CHANGED
@@ -3,13 +3,13 @@
|
|
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.
|
7 |
Author: WP Desk
|
8 |
Author URI: https://www.wpdesk.net/
|
9 |
Text Domain: flexible-shipping
|
10 |
Domain Path: /lang/
|
11 |
Requires at least: 4.5
|
12 |
-
Tested up to: 5.2
|
13 |
WC requires at least: 3.1.0
|
14 |
WC tested up to: 3.6.3
|
15 |
Requires PHP: 5.6
|
@@ -43,8 +43,8 @@ if ( ! class_exists( 'WPDesk_Basic_Requirement_Checker' ) ) {
|
|
43 |
}
|
44 |
|
45 |
/* THESE TWO VARIABLES CAN BE CHANGED AUTOMATICALLY */
|
46 |
-
$plugin_version = '3.
|
47 |
-
$plugin_release_timestamp = '2019-05-
|
48 |
|
49 |
$plugin_name = 'Flexible Shipping';
|
50 |
$plugin_class_name = 'Flexible_Shipping_Plugin';
|
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.4.0
|
7 |
Author: WP Desk
|
8 |
Author URI: https://www.wpdesk.net/
|
9 |
Text Domain: flexible-shipping
|
10 |
Domain Path: /lang/
|
11 |
Requires at least: 4.5
|
12 |
+
Tested up to: 5.2.1
|
13 |
WC requires at least: 3.1.0
|
14 |
WC tested up to: 3.6.3
|
15 |
Requires PHP: 5.6
|
43 |
}
|
44 |
|
45 |
/* THESE TWO VARIABLES CAN BE CHANGED AUTOMATICALLY */
|
46 |
+
$plugin_version = '3.4.0';
|
47 |
+
$plugin_release_timestamp = '2019-05-23 15:30';
|
48 |
|
49 |
$plugin_name = 'Flexible Shipping';
|
50 |
$plugin_class_name = 'Flexible_Shipping_Plugin';
|
readme.txt
CHANGED
@@ -3,8 +3,8 @@ Contributors: wpdesk, swoboda
|
|
3 |
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.2
|
7 |
-
Stable tag: 3.
|
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,12 @@ If you are upgrading from the old Flexible Shipping version (1.3.2, woo-flexible
|
|
175 |
|
176 |
== Changelog ==
|
177 |
|
|
|
|
|
|
|
|
|
|
|
|
|
178 |
= 3.3.13 - 2019-05-13 =
|
179 |
* Fixed fatal when can't unserialize the token from persistence container
|
180 |
* Added option of hiding the FS Connect box
|
3 |
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.2.1
|
7 |
+
Stable tag: 3.4.0
|
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.4.0 - 2019-05-22 =
|
179 |
+
* Added new filter wpdesk_is_wp_log_capture_permitted
|
180 |
+
|
181 |
+
= 3.3.14 - 2019-05-20 =
|
182 |
+
* Fixed logs hijack even when log is disabled
|
183 |
+
|
184 |
= 3.3.13 - 2019-05-13 =
|
185 |
* Fixed fatal when can't unserialize the token from persistence container
|
186 |
* Added option of hiding the FS Connect box
|
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 ComposerAutoloaderInitbcf9b3a05774537e25f626ce421df9f1::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 ComposerAutoloaderInit33a0f5c42db382a6513379fd5a8abfc5
|
|
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 ComposerAutoloaderInit33a0f5c42db382a6513379fd5a8abfc5
|
|
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 ComposerAutoloaderInitbcf9b3a05774537e25f626ce421df9f1
|
6 |
{
|
7 |
private static $loader;
|
8 |
|
19 |
return self::$loader;
|
20 |
}
|
21 |
|
22 |
+
spl_autoload_register(array('ComposerAutoloaderInitbcf9b3a05774537e25f626ce421df9f1', 'loadClassLoader'), true, true);
|
23 |
self::$loader = $loader = new \Composer\Autoload\ClassLoader();
|
24 |
+
spl_autoload_unregister(array('ComposerAutoloaderInitbcf9b3a05774537e25f626ce421df9f1', '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\ComposerStaticInitbcf9b3a05774537e25f626ce421df9f1::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\ComposerStaticInitbcf9b3a05774537e25f626ce421df9f1::$files;
|
52 |
} else {
|
53 |
$includeFiles = require __DIR__ . '/autoload_files.php';
|
54 |
}
|
55 |
foreach ($includeFiles as $fileIdentifier => $file) {
|
56 |
+
composerRequirebcf9b3a05774537e25f626ce421df9f1($fileIdentifier, $file);
|
57 |
}
|
58 |
|
59 |
return $loader;
|
60 |
}
|
61 |
}
|
62 |
|
63 |
+
function composerRequirebcf9b3a05774537e25f626ce421df9f1($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',
|
@@ -567,9 +567,9 @@ class ComposerStaticInit33a0f5c42db382a6513379fd5a8abfc5
|
|
567 |
public static function getInitializer(ClassLoader $loader)
|
568 |
{
|
569 |
return \Closure::bind(function () use ($loader) {
|
570 |
-
$loader->prefixLengthsPsr4 =
|
571 |
-
$loader->prefixDirsPsr4 =
|
572 |
-
$loader->classMap =
|
573 |
|
574 |
}, null, ClassLoader::class);
|
575 |
}
|
4 |
|
5 |
namespace Composer\Autoload;
|
6 |
|
7 |
+
class ComposerStaticInitbcf9b3a05774537e25f626ce421df9f1
|
8 |
{
|
9 |
public static $files = array (
|
10 |
'0509b34a4bd7aebefeac629c9dc8a978' => __DIR__ . '/..' . '/wpdesk/wp-notice/src/WPDesk/notice-functions.php',
|
567 |
public static function getInitializer(ClassLoader $loader)
|
568 |
{
|
569 |
return \Closure::bind(function () use ($loader) {
|
570 |
+
$loader->prefixLengthsPsr4 = ComposerStaticInitbcf9b3a05774537e25f626ce421df9f1::$prefixLengthsPsr4;
|
571 |
+
$loader->prefixDirsPsr4 = ComposerStaticInitbcf9b3a05774537e25f626ce421df9f1::$prefixDirsPsr4;
|
572 |
+
$loader->classMap = ComposerStaticInitbcf9b3a05774537e25f626ce421df9f1::$classMap;
|
573 |
|
574 |
}, null, ClassLoader::class);
|
575 |
}
|
vendor/composer/installed.json
CHANGED
@@ -425,17 +425,17 @@
|
|
425 |
},
|
426 |
{
|
427 |
"name": "wpdesk/wp-logs",
|
428 |
-
"version": "1.
|
429 |
-
"version_normalized": "1.
|
430 |
"source": {
|
431 |
"type": "git",
|
432 |
"url": "https://gitlab.com/wpdesk/wp-logs.git",
|
433 |
-
"reference": "
|
434 |
},
|
435 |
"dist": {
|
436 |
"type": "zip",
|
437 |
-
"url": "https://gitlab.com/api/v4/projects/wpdesk%2Fwp-logs/repository/archive.zip?sha=
|
438 |
-
"reference": "
|
439 |
"shasum": ""
|
440 |
},
|
441 |
"require": {
|
@@ -450,7 +450,7 @@
|
|
450 |
"wimg/php-compatibility": "^8",
|
451 |
"wp-coding-standards/wpcs": "^0.14.1"
|
452 |
},
|
453 |
-
"time": "2019-05-
|
454 |
"type": "library",
|
455 |
"installation-source": "dist",
|
456 |
"autoload": {
|
425 |
},
|
426 |
{
|
427 |
"name": "wpdesk/wp-logs",
|
428 |
+
"version": "1.6.0",
|
429 |
+
"version_normalized": "1.6.0.0",
|
430 |
"source": {
|
431 |
"type": "git",
|
432 |
"url": "https://gitlab.com/wpdesk/wp-logs.git",
|
433 |
+
"reference": "e16ede8850423f6893ab8537db7f321d97734963"
|
434 |
},
|
435 |
"dist": {
|
436 |
"type": "zip",
|
437 |
+
"url": "https://gitlab.com/api/v4/projects/wpdesk%2Fwp-logs/repository/archive.zip?sha=e16ede8850423f6893ab8537db7f321d97734963",
|
438 |
+
"reference": "e16ede8850423f6893ab8537db7f321d97734963",
|
439 |
"shasum": ""
|
440 |
},
|
441 |
"require": {
|
450 |
"wimg/php-compatibility": "^8",
|
451 |
"wp-coding-standards/wpcs": "^0.14.1"
|
452 |
},
|
453 |
+
"time": "2019-05-22T16:24:23+00:00",
|
454 |
"type": "library",
|
455 |
"installation-source": "dist",
|
456 |
"autoload": {
|
vendor/wpdesk/wp-logs/CHANGELOG.md
CHANGED
@@ -1,3 +1,7 @@
|
|
|
|
|
|
|
|
|
|
1 |
## [1.5.4] - 2019-05-06
|
2 |
### Fixed
|
3 |
- Exception: must be an instance of WC_Logger, instance of WPDesk\Logger\WC\WooCommerceMonologPlugin given
|
1 |
+
## [1.6.0] - 2019-05-21
|
2 |
+
### Added
|
3 |
+
- wpdesk_is_wp_log_capture_permitted filter to disable log capture
|
4 |
+
|
5 |
## [1.5.4] - 2019-05-06
|
6 |
### Fixed
|
7 |
- Exception: must be an instance of WC_Logger, instance of WPDesk\Logger\WC\WooCommerceMonologPlugin given
|
vendor/wpdesk/wp-logs/src/WPDeskLoggerFactory.php
CHANGED
@@ -87,7 +87,10 @@ class WPDeskLoggerFactory extends BasicLoggerFactory
|
|
87 |
}
|
88 |
$logger = $this->createLogger($name);
|
89 |
|
90 |
-
|
|
|
|
|
|
|
91 |
if ($name !== self::DEFAULT_LOGGER_CHANNEL_NAME) {
|
92 |
$this->appendFileLog($logger, $this->getFileName($name));
|
93 |
} else {
|
@@ -97,6 +100,15 @@ class WPDeskLoggerFactory extends BasicLoggerFactory
|
|
97 |
return $logger;
|
98 |
}
|
99 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
100 |
/**
|
101 |
* @param $logger
|
102 |
*/
|
87 |
}
|
88 |
$logger = $this->createLogger($name);
|
89 |
|
90 |
+
if (self::isWPLogPermitted()) {
|
91 |
+
$this->appendMainLog($logger);
|
92 |
+
}
|
93 |
+
|
94 |
if ($name !== self::DEFAULT_LOGGER_CHANNEL_NAME) {
|
95 |
$this->appendFileLog($logger, $this->getFileName($name));
|
96 |
} else {
|
100 |
return $logger;
|
101 |
}
|
102 |
|
103 |
+
/**
|
104 |
+
* Is capturing the php log is permitted.
|
105 |
+
*
|
106 |
+
* @return bool
|
107 |
+
*/
|
108 |
+
public static function isWPLogPermitted() {
|
109 |
+
return apply_filters('wpdesk_is_wp_log_capture_permitted', true);
|
110 |
+
}
|
111 |
+
|
112 |
/**
|
113 |
* @param $logger
|
114 |
*/
|