Ejemplo n.º 1
0
 /**
  * Init LearnPress when WP initialises
  */
 function init()
 {
     if ($this->is_request('frontend')) {
         $this->cart = LP_Cart::instance();
     }
     $this->get_session();
     $this->get_user();
     $this->gateways = LP_Gateways::instance()->get_available_payment_gateways();
     //$this->question_factory = LP_Question_Factory::instance();
     LP_Emails::init_email_notifications();
 }
Ejemplo n.º 2
0
 /**
  * Get unique instance of LP_Cart object
  *
  * @return LP_Cart|mixed
  */
 static function instance()
 {
     if (!self::$instance) {
         self::$instance = new self();
     }
     return self::$instance;
 }
Ejemplo n.º 3
0
 /**
  * Init LearnPress when WP initialises
  */
 function init()
 {
     if ($this->is_request('frontend')) {
         $this->cart = LP_Cart::instance();
     }
     $this->get_session();
     $this->get_user();
     $this->gateways = LP_Gateways::instance()->get_available_payment_gateways();
     //$this->question_factory = LP_Question_Factory::instance();
     LP_Emails::init_email_notifications();
     if (get_transient('learn_press_install') == 'yes') {
         flush_rewrite_rules();
         delete_transient('learn_press_install');
     }
 }