L
L
ligisayan2015-12-18 11:27:12
WordPress
ligisayan, 2015-12-18 11:27:12

Why do I get a 500 error when I add a file to a wordpress child theme?

Hi all! I have a wordpress + woocommerce store with a flatastic theme. I need to include the theme configuration file config.php which is located in the theme along the path themes/flatastic/config-woocommerce/config.php. I do everything 1 in 1 according to the author's instructions :

/* Include Config WooCommerce
/ ---------------------------------------------------------------------- */
if (class_exists('WooCommerce')) {
    if ( ! function_exists( 'mad_woo_config' ) ) {
    function mad_woo_config() {
        // Load required classes and functions
        require_once( 'config-woocommerce/config.php' );
        return MAD_WOOCOMMERCE_CONFIG::instance();
    }
}
/**
* Instance main plugin class
*/
    global $mad_woo_config;
    $mad_woo_config = mad_woo_config();
}

But it knocks out a 500 error. in functions.php what could be the problem? The config.php file itself is here

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Andrey Burov, 2015-12-18
@BuriK666

it is written that there is no instance method for the MAD_WOOCOMMERCE_CONFIG class

W
WP Panda, 2015-12-18
@wppanda5

perhaps it is necessary to remove the check for the presence of a class in config.php, to be honest, I haven’t checked how classes behave in the case of a child theme, maybe this is the case.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question