/**
  * @return SS_WC_MailChimp_Compatibility
  */
 public static function get_instance()
 {
     if (empty(self::$instance)) {
         self::$instance = new self();
     }
     return self::$instance;
 }
Exemplo n.º 2
0
 /**
  * Singleton instance
  *
  * @return SS_WC_MailChimp_Plugin   SS_WC_MailChimp_Plugin object
  */
 public static function get_instance()
 {
     if (empty(self::$instance) && !self::$instance instanceof SS_WC_MailChimp_Plugin) {
         self::$instance = new SS_WC_MailChimp_Plugin();
         self::$instance->define_constants();
         self::$instance->save_settings();
         self::$instance->settings();
         self::$instance->includes();
         self::$instance->mailchimp();
         self::$instance->handler = SS_WC_MailChimp_Handler::get_instance();
         self::$instance->compatibility = SS_WC_MailChimp_Compatibility::get_instance();
         self::$instance->admin_notices = new SS_WC_MailChimp_Admin_Notices();
         self::$instance->load_plugin_textdomain();
         //if ( self::$instance->compatibility->is_valid() ) {
         self::update();
         self::$instance->add_hooks();
         do_action('ss_wc_mailchimp_loaded');
         //}
     }
     return self::$instance;
 }