One of my friend had an issue, that when going to admin login page of wordpress, he got the error on line 95 in cherry-core.php.
undefined method Cherry_Api_Js::get_instance
I fixed that by adding singleton pattern to Cherry_Api_JS, and get_instance method (sample code is below)
(For now, I didn't changed scope of constructor to 'private' as I wasn't sure about that. But it is recommended)
private static $instance = NULL;
static function get_instance() {
if (NULL == self::$instance) {
self::$instance = new Cherry_Api_Js();
}
return self::$instance;
}
After the class, there is an instance created of this class. I modified it as below
$Cherry_Api_Js = Cherry_Api_Js::get_instance();
I am not sure if this was because of any problem in installation, or mixed versions wordpress/plugin or something else.
Please consider it, and fix the php files accordingly.
One of my friend had an issue, that when going to admin login page of wordpress, he got the error on line 95 in cherry-core.php.
I fixed that by adding singleton pattern to Cherry_Api_JS, and get_instance method (sample code is below) (For now, I didn't changed scope of constructor to 'private' as I wasn't sure about that. But it is recommended)
After the class, there is an instance created of this class. I modified it as below
$Cherry_Api_Js = Cherry_Api_Js::get_instance();
I am not sure if this was because of any problem in installation, or mixed versions wordpress/plugin or something else. Please consider it, and fix the php files accordingly.
For further communication send me email at
in.pratik13@gmail.com Thanks,