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.

This topic contains 2 replies, has 2 voices.

Last updated by gergiB 4 years, 10 months ago.

Assisted by: Bigul.

Author Posts
April 4, 2020 at 6:40 am #5837119

gergiB

Same happens with WCFM:

Uncaught Error: Call to a member function get_id() on integer in /wp-content/plugins/woocommerce-multilingual/inc/class-wcml-emails.php:395

Stack trace: #0 /wp-content/plugins/woocommerce-multilingual/inc/class-wcml-emails.php(375): WCML_Emails->get_email_translated_string('subject', Object(WCFMvm_Email_Email_verification), NULL)

Any ideas?

April 4, 2020 at 6:44 am #5837123

Bigul
Supporter

Languages: English (English )

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

Hello,

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

To help you faster, I've enabled debug information for this support ticket. Please see this link for how to get this information from your site and give it to us: http://wpml.org/faq/provide-debug-information-faster-support/

Our developers are currently working on the fix. Therefore please try the following steps as a workaround for the time being after a full site backup and let me know your feedback.

1) Visit *wp-content/plugins/woocommerce-multilingual/inc* folder
2) Open *class-wcml-emails.php* file for edit
3) Scroll down to line 395 and make the following modifications.

From

return $this->wcml_get_translated_email_string( $context, $name, $object->object->get_id(), $language );

To

if (is_array($object->object)) {
  return $this->wcml_get_translated_email_string( $context, $name, $object->object['ID'], $language );
}

4) Save the changes. Then check the issue is existing or not

--
Thanks!

Bigul