WordPress should be updated in its entirety to be completely honest, along with a whole boat load of plugins. There are plenty of websites out there claiming that WP is 100% compatible with PHP 8+, but this is a lie as I’m writing thins. Install a plugin such as Query Monitor and you’ll very quickly see how incompatible it actually is.
Expect another 6 months+ before this issue is sorted. In the meanwhile “hacks” such as yours will need to be the order of the day. Well done for figuring it out btw.
-
This reply was modified 1 year, 8 months ago by Strusbobbin.