Skip to content Skip to sidebar

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 0 replies, has 1 voice.

Last updated by dennisv-7 1 week, 4 days ago.

Author Posts
March 26, 2026 at 4:34 pm #17930085

dennisv-7

This function in the file plugins/woocommerce/includes/class-wc-emails.php on line 397 has the variable $text. Somewhere with some function in the theme and plugin this function is triggered but the variable is non-existed or null. In my case I try to bulk edit the order status of some WooCommerce orders. Because this variable is null, the str_replace() function inside this function returns a fatal error with PHP version 8.* and crashes my site. Is it possible for you dev team to modify this function to build an simple check if the variable is a string? Something like this:
$text = $text ?? '';

If this is possible. I would be very happy and it would fix a big issue on my site. And maybe on other sites.

March 26, 2026 at 4:40 pm #17930126

dennisv-7

Sorry, because of all the debugging and all. I send this ticket to the wrong party...