/** * 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(); }
/** * 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'); } }