https://wplms.io/support/forums/topic/unable-to-activate-comments-reviews-on-courses/#post-173729
same problem
This reply has been marked as private.
@chinolz
Try adding this code in wp-admin > Plugins > Editor > select wplms customizer plugin > wplms-customizer.php
// Enable Comments forcefully in course
add_action('init',function(){
global $post;
if($post->post_type == 'course'){
wp_update_post(array('ID'=>$post->ID,'comment_status' => 'open'));
}
});
does not work for global posts
it only works if you specify the exact post id
eg
add_action('init',function(){
wp_update_post(array('ID'=>2927,'comment_status' => 'open'));
});
any solution to make it global?
@chinolz,
checked this number of times but could not find a valid reason behind this. This is not even replicating on my localhost.
The reason behind this could be anything, a conflict or it is not detecting it as a post. Please add the code using the ID's
Cant use the Id the bug is in all lms courses, need to fix the wplms bug or find a quick fix for all posts
This reply has been marked as private.
its showing because i used quick edit to save posts and enable comments. What i need is a permanent fix so when moderators update course information the reviews dont get disabled
never mind Alex gave me different code and it seems to be working, review present front end and its disabled in backend
@chinolz,
Okay, Closing this topic