Skip to content

Commit

Permalink
= 4.2.7.4 =
Browse files Browse the repository at this point in the history
~ Fixed: error loop LearnPress::instance().
  • Loading branch information
tungnxt89 committed Nov 20, 2024
1 parent 13554c7 commit f4f1a86
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions learnpress.php
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ class LearnPress {
/**
* LearnPress constructor.
*/
public function __construct() {
private function __construct() {
/*if ( isset( $_POST['action'] ) && 'heartbeat' === $_POST['action'] ) {
return;
}*/
Expand All @@ -170,9 +170,6 @@ public function __construct() {
// Include files .
$this->includes();

// Load template hooks here, before theme add hooks remove.
include_once 'inc/lp-template-hooks.php';

// hooks .
$this->init_hooks();
} catch ( Throwable $e ) {
Expand Down Expand Up @@ -648,7 +645,6 @@ public function on_deactivate() {
* @version 1.0.4
*/
public function plugins_loaded() {
error_log('11111');
try {
$this->load_plugin_text_domain();
do_action( 'learnpress/hook/before-addons-call-hook-learnpress-ready' );
Expand Down Expand Up @@ -964,3 +960,7 @@ function LP() {
* Create new instance of LearnPress and put it to global
*/
$GLOBALS['LearnPress'] = LearnPress::instance();

// Load template hooks here, before theme add hooks remove.
// Load here because this file call LearnPress::instance(), loop call.
require_once 'inc/lp-template-hooks.php';

0 comments on commit f4f1a86

Please sign in to comment.