Title: [Plugin: WP JS] Error On Activation
Last modified: August 19, 2016

---

# [Plugin: WP JS] Error On Activation

 *  [saphod](https://wordpress.org/support/users/saphod/)
 * (@saphod)
 * [17 years, 10 months ago](https://wordpress.org/support/topic/plugin-wp-js-error-on-activation/)
 * I get the following error on activation of the plugin:
 * Fatal error: Call to undefined function: wp_get_current_user() in (…)/wp-includes/
   capabilities.php on line 447
 * ???
 * (Same with WP-CSS)

Viewing 2 replies - 1 through 2 (of 2 total)

 *  [italianstyle](https://wordpress.org/support/users/italianstyle/)
 * (@italianstyle)
 * [17 years, 9 months ago](https://wordpress.org/support/topic/plugin-wp-js-error-on-activation/#post-822244)
 * try adding
 *     ```
       if (file_exists(ABSPATH . 'wp-includes/pluggable.php')) {
           require_once(ABSPATH . 'wp-includes/pluggable.php');
       }
       ```
   
 * at the beginning of the file wp-js.php right before
    `include_once('wp-js-functions.
   php');`
 * that solved for me. Maybe the same applies to wp-css too
 * edit: plugin now installs but it’s not working
    here’s the output `Oh crap,the
   plugin messed up.Send me a message.File:`
 *  [halmat](https://wordpress.org/support/users/halmat/)
 * (@halmat)
 * [17 years, 8 months ago](https://wordpress.org/support/topic/plugin-wp-js-error-on-activation/#post-822259)
 * Thanks italianstyle. I’ve added those lines of code.
 * Please can you send me:
 * – source code of the page the error occurred on
    – what javascript you were using–
   if you were using the the built-in interface or raw code – the os – version of
   wp
 * Thanks

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘[Plugin: WP JS] Error On Activation’ is closed to new replies.

 * 2 replies
 * 3 participants
 * Last reply from: [halmat](https://wordpress.org/support/users/halmat/)
 * Last activity: [17 years, 8 months ago](https://wordpress.org/support/topic/plugin-wp-js-error-on-activation/#post-822259)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
