public static function instance()
 {
     if (is_null(self::$_instance)) {
         self::$_instance = new self();
     }
     return self::$_instance;
 }
 /**
  * adds some initialization hooks and inits WooCommerce Germanized
  */
 public function __construct()
 {
     // Auto-load classes on demand
     if (function_exists("__autoload")) {
         spl_autoload_register("__autoload");
     }
     spl_autoload_register(array($this, 'autoload'));
     $this->plugin_file = plugin_basename(__FILE__);
     // Always load textdomain
     add_action('plugins_loaded', array($this, 'load_plugin_textdomain'));
     // Check if dependecies are installed and up to date
     $init = WC_GZDP_Dependencies::instance();
     if (!$init->is_loadable()) {
         return;
     }
     // Define constants
     $this->define_constants();
     do_action('woocommerce_gzdp_before_load');
     // Vendidero
     include_once 'includes/vendidero/vendidero-functions.php';
     $this->includes();
     $this->load_modules();
     // Hooks
     add_action('init', array($this, 'init'), 1);
     add_filter('plugin_action_links_' . $this->plugin_file, array($this, 'action_links'));
     add_action('pre_get_posts', array($this, 'hide_invoice_attachments'));
     add_filter('vendidero_updateable_products', array($this, 'register_updates'));
     // Loaded action
     do_action('woocommerce_gzdp_loaded');
 }