PHP 8 and 8.1 critical failure on hooking an undefined function in WordPress no error log

377 Views Asked by At

I just upgraded a WordPress site from 7.4 to 8.0 and in 8.0 got a critical error notice. I enabled debug and debug logging and there was no error display or error logged.

After troubleshooting through the plugins and theme I found an undefined function that was hooked to an action in WooCommerce:

add_action( 'woocommerce_before_add_to_cart_quantity', 'rnr_qty_front_add_cart' );

This action was ignored in php 7.4 but triggered a critical error but with no WordPress debug information in 8.0.

I'm wondering why this is the case?

0

There are 0 best solutions below