Call to undefined function add_filter
-
Have a site triggering tens of thousands of fatals for the following:
PHP Fatal error: Uncaught Error: Call to undefined function add_filter() in /srv/htdocs/wp-content/plugins/barcode-scanner-lite-pos-to-manage-products-inventory-and-orders/request.php:106
Stack trace:
#0 {main}
thrown in /srv/htdocs/wp-content/plugins/barcode-scanner-lite-pos-to-manage-products-inventory-and-orders/request.php on line 106POST requests are being sent to request.php. It appears WordPress is not fully loaded as the following require statement is after add_filter:
add_filter("option_active_plugins", "usbs_plugin_filter", 1, 1);
add_filter("site_option_active_plugins", "usbs_plugin_filter", 1, 1);
add_filter("active_plugins", "usbs_plugin_filter", 1, 1);
require($root . "/wp-load.php")Can you fix the plugin to ensure core functions are available before calling them?
Viewing 5 replies - 1 through 5 (of 5 total)
Viewing 5 replies - 1 through 5 (of 5 total)
The topic ‘Call to undefined function add_filter’ is closed to new replies.