Reply 329758 to: Getting Fatal error with WPML one feture

Avatar: Rose Tyler
Rose Tyler
Support staff
July 15, 2022 at 09:56

Hello,

We got an answer from WPML company and found the solution for your case
We added few lines code in Dashboard -> Snippets -> WPML fix content-product fatal error (snippet)
Code below:

add_action('woocommerce_before_template_part', function ($template_name) {
if ( $template_name == 'loop/loop-start.php') {
remove_all_filters('the_content');
}
}, 10, 1);

Now if that snippet is enabled no fatal errors are shown on frontend
https://prnt.sc/DPjQ-R8NcnxR

Regards

Go To The Whole Conversation In Topic
We're using our own and third-party cookies to improve your experience and our website. Keep on browsing to accept our cookie policy.