nextjs-wordpress-starter
nextjs-wordpress-starter copied to clipboard
Error when activating WDS plugins
Describe the bug Fatal error: Uncaught TypeError: call_user_func_array(): Argument #1 ($callback) must be a valid callback, function "WDS_Headless_Core\activation_callback" not found or invalid function name in C:\xampp\htdocs\wordpress\wp-includes\class-wp-hook.php:307 Stack trace: #0 C:\xampp\htdocs\wordpress\wp-includes\class-wp-hook.php(331): WP_Hook->apply_filters('', Array) #1 C:\xampp\htdocs\wordpress\wp-includes\plugin.php(476): WP_Hook->do_action(Array) #2 C:\xampp\htdocs\wordpress\wp-admin\plugins.php(194): do_action('activate_wds-he...') #3 {main} thrown in C:\xampp\htdocs\wordpress\wp-includes\class-wp-hook.php on line 307
To Reproduce Steps to reproduce the behavior:
- Install plugins via composer
- Try to activate either of the WDS plugins
Expected behavior The plugins should activate normally without error
Desktop (please complete the following information):
- OS: Windows 21H2
- Browser Microsoft edge with Chromium
- Version 90
@phanuelmutuma What is the version of PHP? It seems that PHP 8.1.x gives a Fatal error on several plugins.
I was able to work around this by temporarily adding a couple require statements in each of the WDS plugins:
I opened a PR for one of them here to provide an example: https://github.com/WebDevStudios/wds-headless-core/pull/12
Same error today with PHP 8.1.9, switching to PHP 7.4.30 resolved it