• Resolved Howdy_McGee

    (@howdy_mcgee)


    I made the mistake of installing this plugin before installing WooCommerce and it brought my local site down resulting in a Fatal Error. While I agree, it should be pretty obvious that you _need_ WooCommerce installed before using this plugin, I also don’t think that it should bring down a website should WooCommerce not be installed.

    I would like to see some kind of admin notice or force-fail the install if WooCommerce isn’t installed. Minimally, I’d prefer the plugin not break sites when WooCommerce is not installed.

    Below is the error encountered:

    Uncaught Error: Call to undefined function WC() in \wp-content\plugins\wc-fields-factory\includes\wcff-product-fields.php:82

Viewing 1 replies (of 1 total)
  • Plugin Author Saravana Kumar K

    (@mycholan)

    I totally agree, I shouldn’t assume that WC is already active. I will update in my next release, until then if you want you can update your wccf.php (root file), with the following snippet

    LN : 84

    function wcff() {
    	/* Expose WC Fields Factory to Global Space */
    	global $wcff;
    	/* Make sure woocommerce installed and activated */
    	if (!function_exists('WC')) {
    		add_action('admin_notices', 'wcff_woocommerce_not_found_notice');
    	} else {
    		/* Singleton instance of WC Fields Factory */
    		if (!isset($wcff)) {
    			$wcff = new Wcff();
    		}
    	}	
    	return $wcff;
    } 
Viewing 1 replies (of 1 total)

The topic ‘[Feature Request] WooCommerce Installation Check’ is closed to new replies.