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.