Skip Navigation

This is the technical support forum for WPML - the multilingual WordPress plugin.

Everyone can read, but only WPML clients can post here. WPML team is replying on the forum 6 days per week, 22 hours per day.

Tagged: 

This topic contains 3 replies, has 2 voices.

Last updated by Bigul 1 year, 6 months ago.

Assisted by: Bigul.

Author Posts
July 19, 2023 at 11:15 pm #14068857

tuomoN-2

Hi there,

I am getting this error on woocommerce logs:

2023-07-19T22:56:39+00:00 CRITICAL Uncaught TypeError: method_exists(): Argument #1 ($object_or_class) must be of type object|string, array given in /home2/sukkianet/public_html/wp-content/plugins/sitepress-multilingual-cms/classes/language-switcher/class-wpml-ls-templates.php:321
Stack trace:
#0 /home2/sukkianet/public_html/wp-content/plugins/sitepress-multilingual-cms/classes/language-switcher/class-wpml-ls-templates.php(321): method_exists()
#1 /home2/sukkianet/public_html/wp-content/plugins/sitepress-multilingual-cms/classes/language-switcher/class-wpml-ls-templates.php(307): WPML_LS_Templates->are_template_paths_valid()
#2 /home2/sukkianet/public_html/wp-content/plugins/sitepress-multilingual-cms/classes/language-switcher/class-wpml-ls-templates.php(105): WPML_LS_Templates->get_templates_from_transient()
#3 /home2/sukkianet/public_html/wp-content/plugins/sitepress-multilingual-cms/classes/language-switcher/class-wpml-ls-templates.php(44): WPML_LS_Templates->init_available_templates()
#4 /home2/sukkianet/public_html/wp-includes/class-wp-hook.php(308): WPML_LS_Templates->after_setup_theme_action()
#5 /home2/sukkianet/public_html/wp-includes/class-wp-hook.php(332): WP_Hook->apply_filters()
#6 /home2/sukkianet/public_html/wp-includes/plugin.php(517): WP_Hook->do_action()
#7 /home2/sukkianet/public_html/wp-settings.php(601): do_action()
#8 /home2/sukkianet/public_html/wp-config.php(220): require_once('/home2/sukkiane...')
#9 /home2/sukkianet/public_html/wp-load.php(50): require_once('/home2/sukkiane...')
#10 /home2/sukkianet/public_html/wp-admin/admin-ajax.php(22): require_once('/home2/sukkiane...')
#11 {main}
thrown tässä /home2/sukkianet/public_html/wp-content/plugins/sitepress-multilingual-cms/classes/language-switcher/class-wpml-ls-templates.php rivillä 321

July 20, 2023 at 11:31 am #14071809

Bigul
Supporter

Languages: English (English )

Timezone: Europe/Vienna (GMT+01:00)

Hi Tuomo,

Welcome to the WPML support forum. I will do my best to help you to resolve the issue.

This may be related to the following ticket(sorry it is in Russian). The bug was resolved in that case after clearing all types of caches.

https://wpml.org/ru/forums/topic/after-updates-have-critical-error/

So please take a full site backup{mandatory} and upgrade to WPML 4.6.4 version, the latest. Then clear all types of caches, including browser & server caches, and make sure the issue is existing or not.

--
Thanks!

Bigul

July 20, 2023 at 4:05 pm #14074229

tuomoN-2

Hi Bigul,

Okay, thanks!
I just updated your plugins and now everything works just fine.

Best Regards,
Tuomo Nurkkala

July 21, 2023 at 5:00 am #14075607

Bigul
Supporter

Languages: English (English )

Timezone: Europe/Vienna (GMT+01:00)

Hi Tuomo,

Thank you for the updates. Happy to know you are getting the expected results now. Please feel free to ping us if you need any further assistance with WPML.

--
Thanks!

Bigul