Version Description
- Fixed fatal error that was occurring when using an older version of WPML (introduced in version 4.1.0)
- Fixed a bug causing a 'Invalid or duplicated SKU when saving or updating product' warning when editing a product
- Fixed a bug causing a fatal error when deactivating WooCommerce while WooCommerce Multilingual was active
Download this release
Release Info
Developer | mihaimihai |
Plugin | WooCommerce Multilingual – run WooCommerce with WPML |
Version | 4.1.1 |
Comparing to | |
See all releases |
Code changes from version 4.1.0 to 4.1.1
- inc/class-wcml-products.php +35 -0
- inc/class-woocommerce-wpml.php +5 -5
- inc/currencies/currency-switcher/class-wcml-currency-switcher-templates.php +3 -2
- inc/currencies/currency-switcher/class-wcml-currency-switcher.php +2 -6
- inc/currencies/currency-switcher/class-wcml-file.php +59 -0
- inc/rest-api-support/class-wcml-rest-api-suport.php +1 -1
- readme.txt +6 -1
- vendor/autoload.php +1 -1
- vendor/autoload_52.php +1 -1
- vendor/composer/autoload_classmap.php +1 -8
- vendor/composer/autoload_real.php +4 -4
- vendor/composer/autoload_real_52.php +3 -3
- vendor/composer/autoload_static.php +6 -13
- vendor/otgs/installer/includes/class-installer-dependencies.php +33 -28
- vendor/otgs/installer/includes/installer-api.php +18 -0
- vendor/otgs/installer/includes/installer.class.php +20 -7
- vendor/otgs/installer/installer.php +1 -1
- vendor/otgs/installer/loader.php +1 -1
- vendor/twig/twig/lib/Twig/Compiler.php +1 -1
- wpml-woocommerce.php +2 -2
inc/class-wcml-products.php
CHANGED
@@ -49,6 +49,7 @@ class WCML_Products{
|
|
49 |
add_filter( 'wpml_copy_from_original_custom_fields', array( $this, 'filter_excerpt_field_content_copy' ) );
|
50 |
|
51 |
add_filter( 'wpml_override_is_translator', array( $this, 'wcml_override_is_translator' ), 10, 3 );
|
|
|
52 |
}
|
53 |
|
54 |
// Check if original product
|
@@ -538,4 +539,38 @@ class WCML_Products{
|
|
538 |
}
|
539 |
}
|
540 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
541 |
}
|
49 |
add_filter( 'wpml_copy_from_original_custom_fields', array( $this, 'filter_excerpt_field_content_copy' ) );
|
50 |
|
51 |
add_filter( 'wpml_override_is_translator', array( $this, 'wcml_override_is_translator' ), 10, 3 );
|
52 |
+
add_filter( 'wc_product_has_unique_sku', array( $this, 'check_product_sku' ), 10, 3 );
|
53 |
}
|
54 |
|
55 |
// Check if original product
|
539 |
}
|
540 |
}
|
541 |
|
542 |
+
function check_product_sku( $sku_found, $product_id, $sku ) {
|
543 |
+
|
544 |
+
if ( $sku_found ) {
|
545 |
+
|
546 |
+
$product_trid = $this->sitepress->get_element_trid( $product_id, 'post_' . get_post_type( $product_id ) );
|
547 |
+
|
548 |
+
$products = $this->wpdb->get_results(
|
549 |
+
$this->wpdb->prepare(
|
550 |
+
"
|
551 |
+
SELECT p.ID
|
552 |
+
FROM {$this->wpdb->posts} as p
|
553 |
+
LEFT JOIN {$this->wpdb->postmeta} as pm ON ( p.ID = pm.post_id )
|
554 |
+
WHERE p.post_type IN ( 'product', 'product_variation' )
|
555 |
+
AND p.post_status = 'publish'
|
556 |
+
AND pm.meta_key = '_sku' AND pm.meta_value = '%s'
|
557 |
+
",
|
558 |
+
wp_slash( $sku )
|
559 |
+
)
|
560 |
+
);
|
561 |
+
|
562 |
+
$sku_found = false;
|
563 |
+
|
564 |
+
foreach ( (array) $products as $product ) {
|
565 |
+
$trid = $this->sitepress->get_element_trid( $product->ID, 'post_' . get_post_type( $product_id ) );
|
566 |
+
if ( $product_trid !== $trid ) {
|
567 |
+
$sku_found = true;
|
568 |
+
break;
|
569 |
+
}
|
570 |
+
}
|
571 |
+
}
|
572 |
+
|
573 |
+
return $sku_found;
|
574 |
+
}
|
575 |
+
|
576 |
}
|
inc/class-woocommerce-wpml.php
CHANGED
@@ -74,13 +74,13 @@ class woocommerce_wpml {
|
|
74 |
|
75 |
$this->xdomain_data = new WCML_xDomain_Data;
|
76 |
|
77 |
-
|
78 |
|
79 |
-
if ( 'yes' == get_option( 'woocommerce_api_enabled' ) ){
|
80 |
-
|
81 |
-
|
82 |
new WCML_REST_API_Support( $this, $sitepress );
|
83 |
-
}else{
|
84 |
new WCML_WooCommerce_Rest_API_Support( $this, $sitepress );
|
85 |
}
|
86 |
}
|
74 |
|
75 |
$this->xdomain_data = new WCML_xDomain_Data;
|
76 |
|
77 |
+
new WCML_Widgets( $this );
|
78 |
|
79 |
+
if ( class_exists( 'woocommerce' ) && 'yes' == get_option( 'woocommerce_api_enabled' ) ) {
|
80 |
+
global $sitepress;
|
81 |
+
if ( version_compare( WC()->version, '2.6', '>=' ) ) {
|
82 |
new WCML_REST_API_Support( $this, $sitepress );
|
83 |
+
} else {
|
84 |
new WCML_WooCommerce_Rest_API_Support( $this, $sitepress );
|
85 |
}
|
86 |
}
|
inc/currencies/currency-switcher/class-wcml-currency-switcher-templates.php
CHANGED
@@ -23,12 +23,13 @@ class WCML_Currency_Switcher_Templates {
|
|
23 |
/* @var string $ds */
|
24 |
private $ds = DIRECTORY_SEPARATOR;
|
25 |
|
26 |
-
public function __construct( &$woocommerce_wpml,
|
27 |
|
28 |
$this->woocommerce_wpml = $woocommerce_wpml;
|
29 |
|
30 |
if ( ! $wpml_file ) {
|
31 |
-
|
|
|
32 |
}
|
33 |
|
34 |
$this->wpml_file = $wpml_file;
|
23 |
/* @var string $ds */
|
24 |
private $ds = DIRECTORY_SEPARATOR;
|
25 |
|
26 |
+
public function __construct( &$woocommerce_wpml, WCML_File $wpml_file = null ) {
|
27 |
|
28 |
$this->woocommerce_wpml = $woocommerce_wpml;
|
29 |
|
30 |
if ( ! $wpml_file ) {
|
31 |
+
//TODO: use WPML_FILE class instead after changing requirements for WPML >= 3.6.0
|
32 |
+
$wpml_file = new WCML_File();
|
33 |
}
|
34 |
|
35 |
$this->wpml_file = $wpml_file;
|
inc/currencies/currency-switcher/class-wcml-currency-switcher.php
CHANGED
@@ -57,10 +57,8 @@ class WCML_Currency_Switcher{
|
|
57 |
return '';
|
58 |
}
|
59 |
|
60 |
-
if(
|
61 |
-
$args =
|
62 |
-
'switcher_id' => 'product'
|
63 |
-
);
|
64 |
}
|
65 |
|
66 |
$wcml_settings = $this->woocommerce_wpml->get_settings();
|
@@ -83,8 +81,6 @@ class WCML_Currency_Switcher{
|
|
83 |
$args[ 'color_scheme' ] = isset($currency_switcher_settings['color_scheme']) ? $currency_switcher_settings['color_scheme'] : array();
|
84 |
}
|
85 |
|
86 |
-
}elseif( !isset( $args[ 'switcher_style' ] ) ){
|
87 |
-
$args[ 'switcher_style' ] = 'wcml-dropdown';
|
88 |
}
|
89 |
|
90 |
$preview = '';
|
57 |
return '';
|
58 |
}
|
59 |
|
60 |
+
if( !isset( $args[ 'switcher_id' ] ) ){
|
61 |
+
$args[ 'switcher_id' ] = 'product';
|
|
|
|
|
62 |
}
|
63 |
|
64 |
$wcml_settings = $this->woocommerce_wpml->get_settings();
|
81 |
$args[ 'color_scheme' ] = isset($currency_switcher_settings['color_scheme']) ? $currency_switcher_settings['color_scheme'] : array();
|
82 |
}
|
83 |
|
|
|
|
|
84 |
}
|
85 |
|
86 |
$preview = '';
|
inc/currencies/currency-switcher/class-wcml-file.php
ADDED
@@ -0,0 +1,59 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class WCML_File {
|
4 |
+
/* @var WPML_WP_API $wp_api */
|
5 |
+
private $wp_api;
|
6 |
+
|
7 |
+
/**
|
8 |
+
* @param WPML_WP_API|null $wp_api
|
9 |
+
*/
|
10 |
+
public function __construct( WPML_WP_API $wp_api = null ) {
|
11 |
+
if ( ! $wp_api ) {
|
12 |
+
$wp_api = new WPML_WP_API();
|
13 |
+
}
|
14 |
+
|
15 |
+
$this->wp_api = $wp_api;
|
16 |
+
}
|
17 |
+
|
18 |
+
/**
|
19 |
+
* @param string $path
|
20 |
+
*
|
21 |
+
* @return string
|
22 |
+
*/
|
23 |
+
public function fix_dir_separator( $path ) {
|
24 |
+
$directory_separator = $this->wp_api->constant( 'DIRECTORY_SEPARATOR' );
|
25 |
+
return ( '\\' === $directory_separator ) ? str_replace( '/', '\\', $path ) : str_replace( '\\', '/', $path );
|
26 |
+
}
|
27 |
+
|
28 |
+
/**
|
29 |
+
* @param string $path
|
30 |
+
*
|
31 |
+
* @return string
|
32 |
+
*/
|
33 |
+
public function get_uri_from_path( $path ) {
|
34 |
+
$base = null;
|
35 |
+
|
36 |
+
if ( $this->wp_api->defined( 'WP_CONTENT_DIR' ) && $this->wp_api->defined( 'WP_CONTENT_URL' ) ) {
|
37 |
+
$base_path = $this->fix_dir_separator( $this->wp_api->constant( 'WP_CONTENT_DIR' ) );
|
38 |
+
|
39 |
+
if ( 0 === strpos( $path, $base_path ) ) {
|
40 |
+
$base = array(
|
41 |
+
'path' => $base_path,
|
42 |
+
'uri' => $this->wp_api->constant( 'WP_CONTENT_URL' ),
|
43 |
+
);
|
44 |
+
}
|
45 |
+
}
|
46 |
+
|
47 |
+
if ( ! $base ) {
|
48 |
+
$base = array(
|
49 |
+
'path' => $this->wp_api->constant( 'ABSPATH' ),
|
50 |
+
'uri' => site_url(),
|
51 |
+
);
|
52 |
+
}
|
53 |
+
|
54 |
+
$relative_path = substr( $path, strlen( $base['path'] ) );
|
55 |
+
$relative_path = str_replace( array( '/', '\\' ), '/', $relative_path );
|
56 |
+
$relative_path = ltrim( $relative_path, '/' );
|
57 |
+
return trailingslashit( $base['uri'] ) . $relative_path;
|
58 |
+
}
|
59 |
+
}
|
inc/rest-api-support/class-wcml-rest-api-suport.php
CHANGED
@@ -141,7 +141,7 @@ class WCML_REST_API_Support{
|
|
141 |
$lang = $wp_query->get('lang');
|
142 |
$include = $wp_query->get('post__in');
|
143 |
if( empty( $lang ) && !empty( $include ) ){
|
144 |
-
$filtered_include =
|
145 |
foreach( $include as $id ){
|
146 |
$filtered_include[] = apply_filters( 'translate_object_id', $id, get_post_type($id), true );
|
147 |
}
|
141 |
$lang = $wp_query->get('lang');
|
142 |
$include = $wp_query->get('post__in');
|
143 |
if( empty( $lang ) && !empty( $include ) ){
|
144 |
+
$filtered_include = array();
|
145 |
foreach( $include as $id ){
|
146 |
$filtered_include[] = apply_filters( 'translate_object_id', $id, get_post_type($id), true );
|
147 |
}
|
readme.txt
CHANGED
@@ -5,7 +5,7 @@ Tags: CMS, woocommerce, commerce, ecommerce, e-commerce, products, WPML, multili
|
|
5 |
License: GPLv2
|
6 |
Requires at least: 3.9
|
7 |
Tested up to: 4.7.3
|
8 |
-
Stable tag: 4.1.
|
9 |
|
10 |
Allows running fully multilingual e-commerce sites using WooCommerce and WPML.
|
11 |
|
@@ -142,6 +142,11 @@ WooCommerce Multilingual is compatible with all major WooCommerce extensions. We
|
|
142 |
|
143 |
== Changelog ==
|
144 |
|
|
|
|
|
|
|
|
|
|
|
145 |
= 4.1.0 =
|
146 |
* Enhanced language switchers
|
147 |
* Improved REST API support
|
5 |
License: GPLv2
|
6 |
Requires at least: 3.9
|
7 |
Tested up to: 4.7.3
|
8 |
+
Stable tag: 4.1.1
|
9 |
|
10 |
Allows running fully multilingual e-commerce sites using WooCommerce and WPML.
|
11 |
|
142 |
|
143 |
== Changelog ==
|
144 |
|
145 |
+
= 4.1.1 =
|
146 |
+
* Fixed fatal error that was occurring when using an older version of WPML (introduced in version 4.1.0)
|
147 |
+
* Fixed a bug causing a 'Invalid or duplicated SKU when saving or updating product' warning when editing a product
|
148 |
+
* Fixed a bug causing a fatal error when deactivating WooCommerce while WooCommerce Multilingual was active
|
149 |
+
|
150 |
= 4.1.0 =
|
151 |
* Enhanced language switchers
|
152 |
* Improved REST API support
|
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 ComposerAutoloaderInitba81b8b05211f8381283991a3f3afac5::getLoader();
|
vendor/autoload_52.php
CHANGED
@@ -4,4 +4,4 @@
|
|
4 |
|
5 |
require_once dirname(__FILE__) . '/composer'.'/autoload_real_52.php';
|
6 |
|
7 |
-
return
|
4 |
|
5 |
require_once dirname(__FILE__) . '/composer'.'/autoload_real_52.php';
|
6 |
|
7 |
+
return ComposerAutoloaderInitec1210f07388b2b05ea7727304410095::getLoader();
|
vendor/composer/autoload_classmap.php
CHANGED
@@ -323,6 +323,7 @@ return array(
|
|
323 |
'WCML_Exchange_Rates_UI' => $baseDir . '/inc/template-classes/multi-currency/class-wcml-exchange-rates-ui.php',
|
324 |
'WCML_Exchange_Rates_YahooFinance' => $baseDir . '/inc/currencies/exchange-rate-services/class-wcml-exchange-rates-yahoo-finance.php',
|
325 |
'WCML_Extra_Product_Options' => $baseDir . '/compatibility/class-wcml-extra-product-options.php',
|
|
|
326 |
'WCML_Fix_Copied_Custom_Fields_WPML353' => $baseDir . '/inc/class-wcml-fix-copied-custom-fields-wpml353.php',
|
327 |
'WCML_Flatsome' => $baseDir . '/compatibility/class-wcml-flatsome.php',
|
328 |
'WCML_Install' => $baseDir . '/inc/class-wcml-install.php',
|
@@ -413,14 +414,6 @@ return array(
|
|
413 |
'WCML_sensei' => $baseDir . '/compatibility/class-wcml-sensei.php',
|
414 |
'WCML_wcExporter' => $baseDir . '/compatibility/class-wcml-wcexporter.php',
|
415 |
'WCML_xDomain_Data' => $baseDir . '/inc/class-wcml-xdomain-data.php',
|
416 |
-
'WPML_Auto_Loader' => $vendorDir . '/wpml/commons/src/wpml-auto-loader.php',
|
417 |
-
'WPML_Notice' => $vendorDir . '/wpml/commons/src/notices/class-wpml-notice.php',
|
418 |
-
'WPML_Notice_Action' => $vendorDir . '/wpml/commons/src/notices/class-wpml-notice-action.php',
|
419 |
-
'WPML_Notice_Render' => $vendorDir . '/wpml/commons/src/notices/class-wpml-notice-render.php',
|
420 |
-
'WPML_Notices' => $vendorDir . '/wpml/commons/src/notices/class-wpml-notices.php',
|
421 |
-
'WPML_Templates_Factory' => $vendorDir . '/wpml/commons/src/templating/class-wpml-templates-factory.php',
|
422 |
-
'WPML_Twig_WP_Plugin_Extension' => $vendorDir . '/wpml/commons/src/twig/twig-extensions/wpml-twig-wp-plugin-extension.php',
|
423 |
-
'WPML_WP_API' => $vendorDir . '/wpml/commons/src/wpml-wp/class-wpml-wp-api.php',
|
424 |
'WooCommerce_Functions_Wrapper' => $baseDir . '/inc/woocommerce-functions-wrapper.php',
|
425 |
'woocommerce_wpml' => $baseDir . '/inc/class-woocommerce-wpml.php',
|
426 |
'xrstf\\Composer52\\AutoloadGenerator' => $vendorDir . '/xrstf/composer-php52/lib/xrstf/Composer52/AutoloadGenerator.php',
|
323 |
'WCML_Exchange_Rates_UI' => $baseDir . '/inc/template-classes/multi-currency/class-wcml-exchange-rates-ui.php',
|
324 |
'WCML_Exchange_Rates_YahooFinance' => $baseDir . '/inc/currencies/exchange-rate-services/class-wcml-exchange-rates-yahoo-finance.php',
|
325 |
'WCML_Extra_Product_Options' => $baseDir . '/compatibility/class-wcml-extra-product-options.php',
|
326 |
+
'WCML_File' => $baseDir . '/inc/currencies/currency-switcher/class-wcml-file.php',
|
327 |
'WCML_Fix_Copied_Custom_Fields_WPML353' => $baseDir . '/inc/class-wcml-fix-copied-custom-fields-wpml353.php',
|
328 |
'WCML_Flatsome' => $baseDir . '/compatibility/class-wcml-flatsome.php',
|
329 |
'WCML_Install' => $baseDir . '/inc/class-wcml-install.php',
|
414 |
'WCML_sensei' => $baseDir . '/compatibility/class-wcml-sensei.php',
|
415 |
'WCML_wcExporter' => $baseDir . '/compatibility/class-wcml-wcexporter.php',
|
416 |
'WCML_xDomain_Data' => $baseDir . '/inc/class-wcml-xdomain-data.php',
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
417 |
'WooCommerce_Functions_Wrapper' => $baseDir . '/inc/woocommerce-functions-wrapper.php',
|
418 |
'woocommerce_wpml' => $baseDir . '/inc/class-woocommerce-wpml.php',
|
419 |
'xrstf\\Composer52\\AutoloadGenerator' => $vendorDir . '/xrstf/composer-php52/lib/xrstf/Composer52/AutoloadGenerator.php',
|
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 ComposerAutoloaderInitef9433f3fca31466e8742a1ca02f75ff
|
|
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 ComposerAutoloaderInitba81b8b05211f8381283991a3f3afac5
|
6 |
{
|
7 |
private static $loader;
|
8 |
|
19 |
return self::$loader;
|
20 |
}
|
21 |
|
22 |
+
spl_autoload_register(array('ComposerAutoloaderInitba81b8b05211f8381283991a3f3afac5', 'loadClassLoader'), true, true);
|
23 |
self::$loader = $loader = new \Composer\Autoload\ClassLoader();
|
24 |
+
spl_autoload_unregister(array('ComposerAutoloaderInitba81b8b05211f8381283991a3f3afac5', '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\ComposerStaticInitba81b8b05211f8381283991a3f3afac5::getInitializer($loader));
|
31 |
} else {
|
32 |
$map = require __DIR__ . '/autoload_namespaces.php';
|
33 |
foreach ($map as $namespace => $path) {
|
vendor/composer/autoload_real_52.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
|
3 |
// autoload_real_52.php generated by xrstf/composer-php52
|
4 |
|
5 |
-
class
|
6 |
private static $loader;
|
7 |
|
8 |
public static function loadClassLoader($class) {
|
@@ -19,9 +19,9 @@ class ComposerAutoloaderInitdcb2d84aacc54fb27dd147868cd9a7cf {
|
|
19 |
return self::$loader;
|
20 |
}
|
21 |
|
22 |
-
spl_autoload_register(array('
|
23 |
self::$loader = $loader = new xrstf_Composer52_ClassLoader();
|
24 |
-
spl_autoload_unregister(array('
|
25 |
|
26 |
$vendorDir = dirname(dirname(__FILE__));
|
27 |
$baseDir = dirname($vendorDir);
|
2 |
|
3 |
// autoload_real_52.php generated by xrstf/composer-php52
|
4 |
|
5 |
+
class ComposerAutoloaderInitec1210f07388b2b05ea7727304410095 {
|
6 |
private static $loader;
|
7 |
|
8 |
public static function loadClassLoader($class) {
|
19 |
return self::$loader;
|
20 |
}
|
21 |
|
22 |
+
spl_autoload_register(array('ComposerAutoloaderInitec1210f07388b2b05ea7727304410095', 'loadClassLoader'), true /*, true */);
|
23 |
self::$loader = $loader = new xrstf_Composer52_ClassLoader();
|
24 |
+
spl_autoload_unregister(array('ComposerAutoloaderInitec1210f07388b2b05ea7727304410095', 'loadClassLoader'));
|
25 |
|
26 |
$vendorDir = dirname(dirname(__FILE__));
|
27 |
$baseDir = dirname($vendorDir);
|
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 |
'C' =>
|
@@ -355,6 +355,7 @@ class ComposerStaticInitef9433f3fca31466e8742a1ca02f75ff
|
|
355 |
'WCML_Exchange_Rates_UI' => __DIR__ . '/../..' . '/inc/template-classes/multi-currency/class-wcml-exchange-rates-ui.php',
|
356 |
'WCML_Exchange_Rates_YahooFinance' => __DIR__ . '/../..' . '/inc/currencies/exchange-rate-services/class-wcml-exchange-rates-yahoo-finance.php',
|
357 |
'WCML_Extra_Product_Options' => __DIR__ . '/../..' . '/compatibility/class-wcml-extra-product-options.php',
|
|
|
358 |
'WCML_Fix_Copied_Custom_Fields_WPML353' => __DIR__ . '/../..' . '/inc/class-wcml-fix-copied-custom-fields-wpml353.php',
|
359 |
'WCML_Flatsome' => __DIR__ . '/../..' . '/compatibility/class-wcml-flatsome.php',
|
360 |
'WCML_Install' => __DIR__ . '/../..' . '/inc/class-wcml-install.php',
|
@@ -445,14 +446,6 @@ class ComposerStaticInitef9433f3fca31466e8742a1ca02f75ff
|
|
445 |
'WCML_sensei' => __DIR__ . '/../..' . '/compatibility/class-wcml-sensei.php',
|
446 |
'WCML_wcExporter' => __DIR__ . '/../..' . '/compatibility/class-wcml-wcexporter.php',
|
447 |
'WCML_xDomain_Data' => __DIR__ . '/../..' . '/inc/class-wcml-xdomain-data.php',
|
448 |
-
'WPML_Auto_Loader' => __DIR__ . '/..' . '/wpml/commons/src/wpml-auto-loader.php',
|
449 |
-
'WPML_Notice' => __DIR__ . '/..' . '/wpml/commons/src/notices/class-wpml-notice.php',
|
450 |
-
'WPML_Notice_Action' => __DIR__ . '/..' . '/wpml/commons/src/notices/class-wpml-notice-action.php',
|
451 |
-
'WPML_Notice_Render' => __DIR__ . '/..' . '/wpml/commons/src/notices/class-wpml-notice-render.php',
|
452 |
-
'WPML_Notices' => __DIR__ . '/..' . '/wpml/commons/src/notices/class-wpml-notices.php',
|
453 |
-
'WPML_Templates_Factory' => __DIR__ . '/..' . '/wpml/commons/src/templating/class-wpml-templates-factory.php',
|
454 |
-
'WPML_Twig_WP_Plugin_Extension' => __DIR__ . '/..' . '/wpml/commons/src/twig/twig-extensions/wpml-twig-wp-plugin-extension.php',
|
455 |
-
'WPML_WP_API' => __DIR__ . '/..' . '/wpml/commons/src/wpml-wp/class-wpml-wp-api.php',
|
456 |
'WooCommerce_Functions_Wrapper' => __DIR__ . '/../..' . '/inc/woocommerce-functions-wrapper.php',
|
457 |
'woocommerce_wpml' => __DIR__ . '/../..' . '/inc/class-woocommerce-wpml.php',
|
458 |
'xrstf\\Composer52\\AutoloadGenerator' => __DIR__ . '/..' . '/xrstf/composer-php52/lib/xrstf/Composer52/AutoloadGenerator.php',
|
@@ -462,10 +455,10 @@ class ComposerStaticInitef9433f3fca31466e8742a1ca02f75ff
|
|
462 |
public static function getInitializer(ClassLoader $loader)
|
463 |
{
|
464 |
return \Closure::bind(function () use ($loader) {
|
465 |
-
$loader->prefixLengthsPsr4 =
|
466 |
-
$loader->prefixDirsPsr4 =
|
467 |
-
$loader->prefixesPsr0 =
|
468 |
-
$loader->classMap =
|
469 |
|
470 |
}, null, ClassLoader::class);
|
471 |
}
|
4 |
|
5 |
namespace Composer\Autoload;
|
6 |
|
7 |
+
class ComposerStaticInitba81b8b05211f8381283991a3f3afac5
|
8 |
{
|
9 |
public static $prefixLengthsPsr4 = array (
|
10 |
'C' =>
|
355 |
'WCML_Exchange_Rates_UI' => __DIR__ . '/../..' . '/inc/template-classes/multi-currency/class-wcml-exchange-rates-ui.php',
|
356 |
'WCML_Exchange_Rates_YahooFinance' => __DIR__ . '/../..' . '/inc/currencies/exchange-rate-services/class-wcml-exchange-rates-yahoo-finance.php',
|
357 |
'WCML_Extra_Product_Options' => __DIR__ . '/../..' . '/compatibility/class-wcml-extra-product-options.php',
|
358 |
+
'WCML_File' => __DIR__ . '/../..' . '/inc/currencies/currency-switcher/class-wcml-file.php',
|
359 |
'WCML_Fix_Copied_Custom_Fields_WPML353' => __DIR__ . '/../..' . '/inc/class-wcml-fix-copied-custom-fields-wpml353.php',
|
360 |
'WCML_Flatsome' => __DIR__ . '/../..' . '/compatibility/class-wcml-flatsome.php',
|
361 |
'WCML_Install' => __DIR__ . '/../..' . '/inc/class-wcml-install.php',
|
446 |
'WCML_sensei' => __DIR__ . '/../..' . '/compatibility/class-wcml-sensei.php',
|
447 |
'WCML_wcExporter' => __DIR__ . '/../..' . '/compatibility/class-wcml-wcexporter.php',
|
448 |
'WCML_xDomain_Data' => __DIR__ . '/../..' . '/inc/class-wcml-xdomain-data.php',
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
449 |
'WooCommerce_Functions_Wrapper' => __DIR__ . '/../..' . '/inc/woocommerce-functions-wrapper.php',
|
450 |
'woocommerce_wpml' => __DIR__ . '/../..' . '/inc/class-woocommerce-wpml.php',
|
451 |
'xrstf\\Composer52\\AutoloadGenerator' => __DIR__ . '/..' . '/xrstf/composer-php52/lib/xrstf/Composer52/AutoloadGenerator.php',
|
455 |
public static function getInitializer(ClassLoader $loader)
|
456 |
{
|
457 |
return \Closure::bind(function () use ($loader) {
|
458 |
+
$loader->prefixLengthsPsr4 = ComposerStaticInitba81b8b05211f8381283991a3f3afac5::$prefixLengthsPsr4;
|
459 |
+
$loader->prefixDirsPsr4 = ComposerStaticInitba81b8b05211f8381283991a3f3afac5::$prefixDirsPsr4;
|
460 |
+
$loader->prefixesPsr0 = ComposerStaticInitba81b8b05211f8381283991a3f3afac5::$prefixesPsr0;
|
461 |
+
$loader->classMap = ComposerStaticInitba81b8b05211f8381283991a3f3afac5::$classMap;
|
462 |
|
463 |
}, null, ClassLoader::class);
|
464 |
}
|
vendor/otgs/installer/includes/class-installer-dependencies.php
CHANGED
@@ -113,47 +113,52 @@ class Installer_Dependencies{
|
|
113 |
$plugins = get_plugins();
|
114 |
|
115 |
$installer_settings = WP_Installer()->settings;
|
116 |
-
|
|
|
117 |
|
118 |
-
|
119 |
|
120 |
-
|
121 |
-
|
122 |
-
|
123 |
-
|
124 |
-
|
125 |
-
|
126 |
-
|
127 |
-
|
128 |
-
|
129 |
-
|
130 |
-
|
131 |
|
132 |
-
|
133 |
|
134 |
-
|
135 |
|
136 |
-
|
137 |
-
|
138 |
-
|
139 |
-
|
140 |
|
141 |
-
|
142 |
-
|
143 |
|
144 |
-
|
145 |
-
|
|
|
|
|
|
|
146 |
|
147 |
-
|
148 |
-
|
149 |
|
150 |
-
|
151 |
|
152 |
-
|
153 |
|
154 |
-
|
155 |
|
156 |
|
|
|
157 |
}
|
158 |
|
159 |
}
|
113 |
$plugins = get_plugins();
|
114 |
|
115 |
$installer_settings = WP_Installer()->settings;
|
116 |
+
if ( isset( $installer_settings['repositories'] ) ) {
|
117 |
+
foreach ( $installer_settings['repositories'] as $repository_id => $repository ) {
|
118 |
|
119 |
+
if ( $this->is_win_paths_exception( $repository_id ) ) {
|
120 |
|
121 |
+
$repositories_plugins = array();
|
122 |
+
foreach ( $repository['data']['packages'] as $package ) {
|
123 |
+
foreach ( $package['products'] as $product ) {
|
124 |
+
foreach ( $product['plugins'] as $plugin_slug ) {
|
125 |
+
$download = $installer_settings['repositories'][ $repository_id ]['data']['downloads']['plugins'][ $plugin_slug ];
|
126 |
+
if ( empty( $download['free-on-wporg'] ) ) {
|
127 |
+
$repositories_plugins[ $download['slug'] ] = $download['name'];
|
128 |
+
}
|
129 |
+
}
|
130 |
+
}
|
131 |
+
}
|
132 |
|
133 |
+
foreach ( $plugins as $plugin_id => $plugin ) {
|
134 |
|
135 |
+
if ( in_array( $plugin_id, $plugins_with_updates ) ) {
|
136 |
|
137 |
+
$wp_plugin_slug = dirname( $plugin_id );
|
138 |
+
if ( empty( $wp_plugin_slug ) ) {
|
139 |
+
$wp_plugin_slug = basename( $plugin_id, '.php' );
|
140 |
+
}
|
141 |
|
142 |
+
foreach ( $repositories_plugins as $slug => $name ) {
|
143 |
+
if ( $wp_plugin_slug == $slug || $name == $plugin['Name'] || $name == $plugin['Title'] ) { //match order: slug, name, title
|
144 |
|
145 |
+
remove_action( "after_plugin_row_$plugin_id", 'wp_plugin_update_row', 10, 2 );
|
146 |
+
add_action( "after_plugin_row_$plugin_id", array(
|
147 |
+
$this,
|
148 |
+
'wp_plugin_update_row_win_exception',
|
149 |
+
), 10, 2 );
|
150 |
|
151 |
+
}
|
152 |
+
}
|
153 |
|
154 |
+
}
|
155 |
|
156 |
+
}
|
157 |
|
158 |
+
}
|
159 |
|
160 |
|
161 |
+
}
|
162 |
}
|
163 |
|
164 |
}
|
vendor/otgs/installer/includes/installer-api.php
CHANGED
@@ -112,5 +112,23 @@ class WP_Installer_API{
|
|
112 |
|
113 |
}
|
114 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
115 |
|
116 |
}
|
112 |
|
113 |
}
|
114 |
|
115 |
+
/**
|
116 |
+
* Retrieve the ID of the last user who registered a repository.
|
117 |
+
*
|
118 |
+
* @since 1.7.16
|
119 |
+
*
|
120 |
+
* @param string The repository id (e.g. wpml)
|
121 |
+
* @return int The user id (or zero)
|
122 |
+
*/
|
123 |
+
public static function get_registering_user_id( $repository_id = 'wpml' ){
|
124 |
+
|
125 |
+
$user_id = 0;
|
126 |
+
if( isset( WP_Installer()->settings['repositories'][$repository_id]['subscription']['registered_by'] ) ){
|
127 |
+
$user_id = WP_Installer()->settings['repositories'][$repository_id]['subscription']['registered_by'];
|
128 |
+
}
|
129 |
+
|
130 |
+
return $user_id;
|
131 |
+
}
|
132 |
+
|
133 |
|
134 |
}
|
vendor/otgs/installer/includes/installer.class.php
CHANGED
@@ -201,7 +201,11 @@ final class WP_Installer{
|
|
201 |
}
|
202 |
|
203 |
public function load_locale(){
|
204 |
-
|
|
|
|
|
|
|
|
|
205 |
$locale = apply_filters( 'plugin_locale', $locale, 'installer' );
|
206 |
$mo_file = $this->plugin_path() . '/locale/installer-' . $locale . '.mo';
|
207 |
if(file_exists($mo_file)){
|
@@ -467,6 +471,10 @@ final class WP_Installer{
|
|
467 |
$this->settings = unserialize($_settings);
|
468 |
}
|
469 |
|
|
|
|
|
|
|
|
|
470 |
if (is_multisite() && isset($this->settings['repositories'])) {
|
471 |
$network_settings = maybe_unserialize(get_site_option('wp_installer_network'));
|
472 |
if ($network_settings) {
|
@@ -979,11 +987,8 @@ final class WP_Installer{
|
|
979 |
// downloads
|
980 |
if(isset($subscription_type) && !$expired && ($product['subscription_type'] == $subscription_type || $product['subscription_type_equivalent'] == $subscription_type)){
|
981 |
foreach($product['plugins'] as $plugin_slug){
|
982 |
-
|
983 |
-
$row['downloads'][] = $this->settings['repositories'][$repository_id]['data']['downloads']['plugins'][$plugin_slug];
|
984 |
-
|
985 |
}
|
986 |
-
|
987 |
}
|
988 |
|
989 |
//subpackages
|
@@ -1120,7 +1125,11 @@ final class WP_Installer{
|
|
1120 |
$subscription_data = $this->fetch_subscription_data( $repository_id, $site_key, self::SITE_KEY_VALIDATION_SOURCE_REGISTRATION );
|
1121 |
|
1122 |
if ( $subscription_data ) {
|
1123 |
-
$this->settings['repositories'][$repository_id]['subscription'] = array(
|
|
|
|
|
|
|
|
|
1124 |
$this->save_settings();
|
1125 |
} else {
|
1126 |
$error = __( 'Invalid site key for the current site.', 'installer' )
|
@@ -1215,7 +1224,11 @@ final class WP_Installer{
|
|
1215 |
$subscription_data = $this->fetch_subscription_data( $repository_id, $site_key, self::SITE_KEY_VALIDATION_SOURCE_UPDATES_CHECK );
|
1216 |
|
1217 |
if ( $subscription_data ) {
|
1218 |
-
$this->settings['repositories'][$repository_id]['subscription'] = array(
|
|
|
|
|
|
|
|
|
1219 |
|
1220 |
//also refresh products information
|
1221 |
$this->refresh_repositories_data();
|
201 |
}
|
202 |
|
203 |
public function load_locale(){
|
204 |
+
if( function_exists('get_user_locale') ){
|
205 |
+
$locale = get_user_locale();
|
206 |
+
}else{
|
207 |
+
$locale = get_locale();
|
208 |
+
}
|
209 |
$locale = apply_filters( 'plugin_locale', $locale, 'installer' );
|
210 |
$mo_file = $this->plugin_path() . '/locale/installer-' . $locale . '.mo';
|
211 |
if(file_exists($mo_file)){
|
471 |
$this->settings = unserialize($_settings);
|
472 |
}
|
473 |
|
474 |
+
if ( ! array_key_exists( 'repositories', $this->settings ) ) {
|
475 |
+
$this->settings['repositories'] = array();
|
476 |
+
}
|
477 |
+
|
478 |
if (is_multisite() && isset($this->settings['repositories'])) {
|
479 |
$network_settings = maybe_unserialize(get_site_option('wp_installer_network'));
|
480 |
if ($network_settings) {
|
987 |
// downloads
|
988 |
if(isset($subscription_type) && !$expired && ($product['subscription_type'] == $subscription_type || $product['subscription_type_equivalent'] == $subscription_type)){
|
989 |
foreach($product['plugins'] as $plugin_slug){
|
990 |
+
$row['downloads'][ $plugin_slug ] = $this->settings['repositories'][$repository_id]['data']['downloads']['plugins'][$plugin_slug];
|
|
|
|
|
991 |
}
|
|
|
992 |
}
|
993 |
|
994 |
//subpackages
|
1125 |
$subscription_data = $this->fetch_subscription_data( $repository_id, $site_key, self::SITE_KEY_VALIDATION_SOURCE_REGISTRATION );
|
1126 |
|
1127 |
if ( $subscription_data ) {
|
1128 |
+
$this->settings['repositories'][$repository_id]['subscription'] = array(
|
1129 |
+
'key' => $site_key,
|
1130 |
+
'data' => $subscription_data,
|
1131 |
+
'registered_by' => get_current_user_id()
|
1132 |
+
);
|
1133 |
$this->save_settings();
|
1134 |
} else {
|
1135 |
$error = __( 'Invalid site key for the current site.', 'installer' )
|
1224 |
$subscription_data = $this->fetch_subscription_data( $repository_id, $site_key, self::SITE_KEY_VALIDATION_SOURCE_UPDATES_CHECK );
|
1225 |
|
1226 |
if ( $subscription_data ) {
|
1227 |
+
$this->settings['repositories'][$repository_id]['subscription'] = array(
|
1228 |
+
'key' => $site_key,
|
1229 |
+
'data' => $subscription_data,
|
1230 |
+
'registered_by' => get_current_user_id()
|
1231 |
+
);
|
1232 |
|
1233 |
//also refresh products information
|
1234 |
$this->refresh_repositories_data();
|
vendor/otgs/installer/installer.php
CHANGED
@@ -1,5 +1,5 @@
|
|
1 |
<?php
|
2 |
-
define('WP_INSTALLER_VERSION', '1.7.
|
3 |
|
4 |
include_once dirname(__FILE__) . '/includes/installer.class.php';
|
5 |
|
1 |
<?php
|
2 |
+
define('WP_INSTALLER_VERSION', '1.7.16');
|
3 |
|
4 |
include_once dirname(__FILE__) . '/includes/installer.class.php';
|
5 |
|
vendor/otgs/installer/loader.php
CHANGED
@@ -19,7 +19,7 @@ $wp_installer_instance = dirname(__FILE__) . '/installer.php';
|
|
19 |
global $wp_installer_instances;
|
20 |
$wp_installer_instances[$wp_installer_instance] = array(
|
21 |
'bootfile' => $wp_installer_instance,
|
22 |
-
'version' => '1.7.
|
23 |
);
|
24 |
|
25 |
|
19 |
global $wp_installer_instances;
|
20 |
$wp_installer_instances[$wp_installer_instance] = array(
|
21 |
'bootfile' => $wp_installer_instance,
|
22 |
+
'version' => '1.7.16'
|
23 |
);
|
24 |
|
25 |
|
vendor/twig/twig/lib/Twig/Compiler.php
CHANGED
@@ -169,7 +169,7 @@ class Twig_Compiler implements Twig_CompilerInterface
|
|
169 |
public function repr($value)
|
170 |
{
|
171 |
if (is_int($value) || is_float($value)) {
|
172 |
-
if (false !== $locale = setlocale(LC_NUMERIC, 0)) {
|
173 |
setlocale(LC_NUMERIC, 'C');
|
174 |
}
|
175 |
|
169 |
public function repr($value)
|
170 |
{
|
171 |
if (is_int($value) || is_float($value)) {
|
172 |
+
if (false !== $locale = setlocale(LC_NUMERIC, '0')) {
|
173 |
setlocale(LC_NUMERIC, 'C');
|
174 |
}
|
175 |
|
wpml-woocommerce.php
CHANGED
@@ -6,12 +6,12 @@
|
|
6 |
Author: OnTheGoSystems
|
7 |
Author URI: http://www.onthegosystems.com/
|
8 |
Text Domain: woocommerce-multilingual
|
9 |
-
Version: 4.1.
|
10 |
*/
|
11 |
|
12 |
if( defined( 'WCML_VERSION' ) ) return;
|
13 |
|
14 |
-
define( 'WCML_VERSION', '4.1.
|
15 |
define( 'WCML_PLUGIN_PATH', dirname( __FILE__ ) );
|
16 |
define( 'WCML_PLUGIN_FOLDER', basename( WCML_PLUGIN_PATH ) );
|
17 |
define( 'WCML_LOCALE_PATH', WCML_PLUGIN_PATH . '/locale' );
|
6 |
Author: OnTheGoSystems
|
7 |
Author URI: http://www.onthegosystems.com/
|
8 |
Text Domain: woocommerce-multilingual
|
9 |
+
Version: 4.1.1
|
10 |
*/
|
11 |
|
12 |
if( defined( 'WCML_VERSION' ) ) return;
|
13 |
|
14 |
+
define( 'WCML_VERSION', '4.1.1' );
|
15 |
define( 'WCML_PLUGIN_PATH', dirname( __FILE__ ) );
|
16 |
define( 'WCML_PLUGIN_FOLDER', basename( WCML_PLUGIN_PATH ) );
|
17 |
define( 'WCML_LOCALE_PATH', WCML_PLUGIN_PATH . '/locale' );
|