WooCommerce - Call to undefined function is_woocommerce()
new here and to wordpress plugins development, go easy on me :D
Anyway, I am trying to create a new plugin and I am getting a 500 error.
I changed WP_DEBUG
in config.php to true in order to see what is causing the 500 error and got this message:
Fatal error: Uncaught Error: Call to undefined function is_woocommerce() in...
This is my code currently:
?php
/**
* Plugin Name:
* Plugin URI:
* Description:
* Author:
* Author URI:
* Version: 1.0
* Text Domain:
*
* Copyright: (c) 2018
*
* License:
* License URI:
*
* @author
* @copyright Copyright (c) 2018
* @license
*
*/
//
defined( 'ABSPATH' ) or exit;
if (function_exists(is_woocommerce())) {
echo "test: ".is_woocommerce();
} else {
echo "test: Function does not exists!";
}
If you need any more information, tell me and I'll edit the question. Help will be appreciated, thanks!
Topic 500-internal-error plugin-development plugins Wordpress
Category Web