PHP Fatal error after updating to v 2.2.0
-
After updating plugin to v 2.2.0 activating/deactivating ANY plugin gives the following error:
PHP Fatal error: Uncaught ArgumentCountError: Too few arguments to function WCML_Emails::set_locale_for_emails(), 1 passed in /public_html/wp-includes/class-wp-hook.php on line 298 and exactly 2 expected in /public_html/wp-content/plugins/woocommerce-multilingual/inc/class-wcml-emails.php:418 Stack trace: #0 /public_html/wp-includes/class-wp-hook.php(298): WCML_Emails->set_locale_for_emails('it_IT') #1 /public_html/wp-includes/plugin.php(203): WP_Hook->apply_filters('it_IT', Array) #2 /public_html/wp-content/plugins/woocommerce-trusted-shops/includes/class-wc-ts-install.php(43): apply_filters('plugin_locale', 'it_IT') #3 /public_html/wp-includes/class-wp-hook.php(298): WC_TS_Install->install(false) #4 /public_html/wp-includes/class-wp-hook.php(323): WP_Hook->apply_filters('', Array) #5 /public_html/wp-includes/plugin.php(453): WP_Hook->do_action(Array) #6 /public_html/wp-admin/includes/plugin.php(591): in /home/wwwfortu/public_html/wp-content/plugins/woocommerce-multilingual/inc/class-wcml-emails.php on line 418
maybe it happens only when WPML is active
Anyway fixing the stack trace #2 fixes the issue.
Just adding the text_domain to the plugin_locale filter.HOW TO:
Change the line 43 of the file /wp-content/plugins/woocommerce-trusted-shops/includes/class-wc-ts-install.php
from this:
$locale = apply_filters( 'plugin_locale', get_locale() );
to this
$locale = apply_filters( 'plugin_locale', get_locale(), 'woocommerce-trusted-shops' );
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘PHP Fatal error after updating to v 2.2.0’ is closed to new replies.