Home › Forums › Legacy Support › Support queries › Setup issues › New customized user roles
- This topic has 38 replies, 3 voices, and was last updated 2 years, 8 months ago by Veronica.
-
AuthorPosts
-
August 20, 2021 at 12:18 pm #368759Anshuman SahuKeymasterHi 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 } });
August 22, 2021 at 9:29 am #368894hothaibinhParticipanthi, where do I put this code in ?August 23, 2021 at 10:40 am #368944VeronicaModeratorhi 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 fileAugust 23, 2021 at 5:12 pm #369002hothaibinhParticipantHi 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/elearniAugust 24, 2021 at 12:32 pm #369084VeronicaModeratorhi 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);August 29, 2021 at 6:50 pm #369471hothaibinhParticipantHi 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 } });August 30, 2021 at 10:36 am #369495VeronicaModeratorhi 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);September 3, 2021 at 12:29 pm #369909hothaibinhParticipantI 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} thrownSeptember 4, 2021 at 10:13 am #369994VeronicaModeratorhi have you added this code to the file? because you need to comment out the above line -
AuthorPosts
- The topic ‘New customized user roles’ is closed to new replies.