Fatal error: Call to a member function add_cap() on null
-
Plugin could not be activated because it triggered a fatal error.
Fatal error: Call to a member function add_cap() on null in /home/straypaw/public_html/wp-content/plugins/give/includes/admin/upgrades/upgrade-functions.php on line 788HELP!
function give_v188_upgrades() {
global $wp_roles;
// Get the role object.
$give_worker = get_role( ‘give_worker’ );// A list of capabilities to add for give workers.
$caps_to_add = array(
‘edit_posts’,
‘edit_pages’,
);foreach ( $caps_to_add as $cap ) {
// Add the capability.
Line: 788>>>>>>>>>>>> $give_worker->add_cap( $cap );
}The page I need help with: [log in to see the link]
- The topic ‘Fatal error: Call to a member function add_cap() on null’ is closed to new replies.