• I just tried activating your plugin on one of my sites, which gave me an Fatal Error:

    Fatal error: Uncaught Error: Call to undefined function wp_get_current_user() in /srv/***/public/wp-includes/capabilities.php:539 Stack trace:
    #0 /srv/***/public/wp-content/plugins/woocommerce/includes/wc-user-functions.php(317): current_user_can(‘administrator’)
    #1 /srv/***/public/wp-includes/class-wp-hook.php(298): wc_modify_editable_roles(Array) #2 /srv/***/public/wp-includes/plugin.php(203): WP_Hook->apply_filters(Array, Array) #3 /srv/***/public/wp-admin/includes/user.php(241): apply_filters(‘editable_roles’, Array)
    #4 /srv/***/public/wp-content/plugins/woorocks-magic-content/woorocks-magic-content.php(71): get_editable_roles()
    #5 /srv/***/public/wp-content/plugins/woorocks-magic-content/woorocks-magic-content.php(95): get_wp_roles()
    #6 /srv/***/public/wp-settings.php(303): include_once(‘/srv/users/serv…’)
    #7 /srv/user in /srv/***/public/wp-includes/capabilities.php on line 539

    • This topic was modified 7 years, 5 months ago by Danstah.
Viewing 6 replies - 1 through 6 (of 6 total)
  • Thread Starter Danstah

    (@danstah)

    Here’s the code in capabilities. I’ve marked line 539:

    https://gist.github.com/GAPP99/191d1aca36e8241a71f74700e6b1dc18

    Plugin Author Andreas Kviby

    (@andreaskviby)

    Hey
    It seem that the feature is locked on your WP install for some reason. have you or your host removed some WP files for security reasons? I haven’t had anyone having this issue before and the plugin is used by hundreds now.

    Can you see if some files are removed.

    Thread Starter Danstah

    (@danstah)

    Hey Andreas,

    It happens when I activate the plugin. I haven’t removed anything at all, and right when I deactivate it through the FTP, the site works again. I’ve tested it on 3 different sites, and latest a clean local site, with just WP, Elementor and this.

    Would you care to investigate onto the server itself? If so, please provide me with a link to your website, so I can contact you personally.

    Thread Starter Danstah

    (@danstah)

    It does support PHP7.0 and WC2.6, right?

    Actually I’ve tested it on WC3.0, where it also does an fatal error.

    • This reply was modified 7 years, 5 months ago by Danstah.
    • This reply was modified 7 years, 5 months ago by Danstah.
    Plugin Author Andreas Kviby

    (@andreaskviby)

    Hey
    I will investigate, you can reach me at andreas (a) pilgrimsbo.se for personal support.

    Thread Starter Danstah

    (@danstah)

    Hey, did you manage to look into it?

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Fatal Error’ is closed to new replies.