Ever went pulling your hair because of this error? And no matter what you activate, deactivate, nothing would help?
[24-Mar-2024 04:34:18 UTC] PHP Fatal error: Uncaught TypeError: call_user_func_array(): Argument #1 ($callback) must be a valid callback, function "wp_print_font_faces" not found or invalid function name in wp-includes/class-wp-hook.php:324
Stack trace:
#0 wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters()
#1 wp-includes/plugin.php(517): WP_Hook->do_action()
#2 wp-admin/admin-header.php(132): do_action()
#3 wp-admin/index.php(137): require_once('...')
#4 {main}
thrown in wp-includes/class-wp-hook.php on line 324
This error is caused by this file: wp-admin/includes/admin-filters.php And this happens when a WordPress update fails to delete this file.
Table of Contents
How to Fix Fatal error: Uncaught TypeError: call_user_func_array… wp_print_font_faces
The ideal way to update WordPress is through the dashboard. But just in case you felt a little geeky-nerdy and simply overwrote the wp-admin and wp-includes folders, this method would overwrite the files and skip deleting the old, redundant files. All you have to do is to delete the file wp-admin/includes/admin-filters.php. The right way though is to delete wp-admin and wp-includes folders and then upload them afresh.
Solution for Fatal error
Delete the file wp-admin/includes/admin-filters.php because it’s not supposed to be present after the update.