PHP Fatal error: Uncaught TypeError: call_user_func_array()


We recently updated to PHP 8.0 and we are getting this fatal error on our website:

PHP Fatal error: Uncaught TypeError: call_user_func_array(): Argument #1 ($callback) must be a valid callback, non-static method wp_jquery_manager_plugin::autoptimize_support() cannot be called statically in /www/gogohanguk_662/public/wp-includes/class-wp-hook.php:292
Stack trace:
#0 /www/gogohanguk_662/public/wp-includes/plugin.php(212): WP_Hook->apply_filters(Array, Array)
#1 /www/gogohanguk_662/public/wp-content/plugins/autoptimize/classes/autoptimizeScripts.php(286): apply_filters('autoptimize_fil...', Array)
#2 /www/gogohanguk_662/public/wp-content/plugins/autoptimize/classes/autoptimizeMain.php(577): autoptimizeScripts->read(Array)
#3 [internal function]: autoptimizeMain->end_buffering('<!DOCTYPE html>...', 9)
#4 /www/gogohanguk_662/public/wp-includes/functions.php(4759): ob_end_flush()
#5 /www/gogohanguk_662/public/wp-includes/class-wp-hook.php(292): wp_ob_end_flush_all('')
#6 /www/gogohanguk_662/public/wp-includes/class-wp-hook.php(316): WP_Hook->apply_filters('', Array)
#7 /" while reading response header from upstream, client:, server:, request: "GET /en/blog/hanbok-the-traditional-korean-dress/ HTTP/1.1", upstream: "fastcgi://unix:/var/run/php8.0-fpm-gogohanguk.sock:", host: "gogohanguk

Plugin is updated. When I turn off the plugin the error disappears.

Any idea how to fix this?

Thank you!


This site will teach you how to build a WordPress website for beginners. We will cover everything from installing WordPress to adding pages, posts, and images to your site. You will learn how to customize your site with themes and plugins, as well as how to market your site online.

Buy WordPress Transfer