Hi, looks I am missing something out, can someone please explain this to me. I want to create object inside __construct then call it in another method of that class?
class MyPlugin { public function __construct() { require_once(sprintf("%s/templates/class-db.php", diame(__FILE__))); $db = new Orders_DB(); } public static function activate() { $db->create_table(); }
}
not working of course, tried a lot of things, but guess I am missing some basic things here. Thanks!