Fatal Error: Call to undefined function wp_print_notices
-
The plugin is throwing a fatal error:
Fatal error: Uncaught Error: Call to undefined function wc_print_notices() in /var/www/html/wp-content/plugins/woo-add-to-quote/shortcodes.php:17
require_once('functions.php');
in the main plugin file woo_add_to_quote.php should be wrapped in a check to see if WooCommerce has been loaded because plugins load at different times.You might want to consider wrapping that in a function that gets called on the
plugins_loaded
hook or refactor thewatq_check_if_woo_is_active
function a little bit to include the include.Something like this would work without refactoring the
watq_check_if_woo_is_active
function.function watq_load_functions() { if ( class_exists('WooCommerce') ) { require_once('functions.php'); } } add_action( 'plugins_loaded', 'watq_load_functions' );
- The topic ‘Fatal Error: Call to undefined function wp_print_notices’ is closed to new replies.