New customized user roles

Home Forums Legacy Support Support queries Setup issues New customized user roles

Viewing 9 posts - 31 through 39 (of 39 total)
  • Author
    Posts
  • #368759
    Anshuman Sahu
    Keymaster
    Hi im sorry please update this code in order for that to work :
    
    add_action('init',function(){
      if(class_exists('WPLMS_Coauthors_Plus')){
        $init = WPLMS_Coauthors_Plus::init();
        remove_filter('wplms_display_course_instructor',array($init,'wplms_coauthor_plus_instructor'),10,2);
        //remove_filter('wplms_course_instructors',array($init,'wplms_coauthor_plus_course_instructor'),10,2);//removing this line
      }
    });
    #368894
    hothaibinh
    Participant
    hi, where do I put this code in ?
    #368944
    Veronica
    Moderator
    hi you need to add this in wp-admin>>plugins>>plugins editor select the wplms customizer plugin and then add the code in wplms-customizer.php file
    #369002
    hothaibinh
    Participant
    Hi I got this error while adding the code Your PHP code changes were rolled back due to an error on line 35 of file wp-content/plugins/wplms-coauthors-plus/wplms-coauthor-plus.php. Please fix and try saving again. Uncaught Error: Using $this when not in object context in wp-content/plugins/wplms-coauthors-plus/wplms-coauthor-plus.php:35 Stack trace: #0 wp-content/plugins/wplms-customizer/wplms-customizer.php(179): WPLMS_Coauthors_Plus::init() #1 wp-includes/class-wp-hook.php(303): {closure}('') #2 wp-includes/class-wp-hook.php(327): WP_Hook->apply_filters(NULL, Array) #3 wp-includes/plugin.php(470): WP_Hook->do_action(Array) #4 wp-settings.php(578): do_action('init') #5 wp-config.php(68): require_once('/var/www/vhosts...') #6 wp-load.php(50): require_once('/var/www/vhosts...') #7 /var/www/vhosts/elearni
    #369084
    Veronica
    Moderator
    hi yes right directly goto co author plus' file comment out this line : add_filter('wplms_display_course_instructor',array($this,'wplms_coauthor_plus_instructor'),10,2);
    #369471
    hothaibinh
    Participant
    Hi do you mean this ? Go to co author plus to add add_filter(‘wplms_display_course_instructor’,array($this,’wplms_coauthor_plus_instructor’),10,2); then go to wplms customizer to add add_action('init',function(){ if(class_exists('WPLMS_Coauthors_Plus')){ $init = WPLMS_Coauthors_Plus::init(); remove_filter('wplms_display_course_instructor',array($init,'wplms_coauthor_plus_instructor'),10,2); //remove_filter('wplms_course_instructors',array($init,'wplms_coauthor_plus_course_instructor'),10,2);//removing this line } });
    #369495
    Veronica
    Moderator
    hi NO directly and only follow this: directly goto co author plus’ file comment out this line : add_filter(‘wplms_display_course_instructor’,array($this,’wplms_coauthor_plus_instructor’),10,2);
    #369909
    hothaibinh
    Participant
    I did that, this is what I got Your PHP code changes were rolled back due to an error on line 1951 of file wp-content/plugins/co-authors-plus/co-authors-plus.php. Please fix and try saving again. Uncaught Error: Using $this when not in object context in wp-content/plugins/co-authors-plus/co-authors-plus.php:1951 Stack trace: #0 wp-settings.php(409): include_once() #1 wp-config.php(68): require_once('/var/www/vhosts...') #2 wp-load.php(50): require_once('/var/www/vhosts...') #3 wp-admin/admin.php(34): require_once('/var/www/vhosts...') #4 wp-admin/plugin-editor.php(10): require_once('/var/www/vhosts...') #5 {main} thrown
    #369994
    Veronica
    Moderator
    hi have you added this code to the file? because you need to comment out the above line
Viewing 9 posts - 31 through 39 (of 39 total)
  • The topic ‘New customized user roles’ is closed to new replies.