0

Error when running plugins learnpress in wordpress

Warning: include(/home/user/public_html/domain/wp-content/plugins/learnpress/templates/single-course/enroll-button-new.php): failed to open stream: No such file or directory in /home/user/public_html/domain/wp-content/plugins/learnpress/inc/lp-template-functions.php on line 1227

Warning: include(/home/user/public_html/domain/wp-content/plugins/learnpress/templates/single-course/enroll-button-new.php): failed to open stream: No such file or directory in /home/user/public_html/domain/wp-content/plugins/learnpress/inc/lp-template-functions.php on line 1227

Inside the File lp-template-functions.php on line 1227

do_action( 'learn_press_before_template_part', $template_name, $template_path, $located, $args );

include( $located );

do_action( 'learn_press_after_template_part', $template_name, $template_path, $located, $args );

view all file https://github.com/LearnPress/LearnPress/blob/master/inc/lp-template-functions.php

0

It looks like the file is missing but its has been called from one of the files.

After further review of the plugin files I saw that inside the LearnPress->inc directory in lp-core-functions.php file at 2291 line it adding the filter to add that missing file however that file is not inside the template files. Developer of the plugin has moved all the buttons file inside buttons.php in template folder without updating that filter.

So the solution is to remove that filter manually until the developer fix the issue or you can manually go the lp-core-functions.php file and comment out line 2291 like below

// add_filter( 'learn_press_get_template', '_learn_press_enroll_button', 1000, 5 );

Or you can add this line to removed that filter in somewhere in your theme functions.php

`remove_filter( 'learn_press_get_template', '_learn_press_enroll_button');`

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.