Title: PHP Fatal error: Freemius::get_api_user_scope_by_user()
Last modified: January 28, 2020

---

# PHP Fatal error: Freemius::get_api_user_scope_by_user()

 *  [ahmedcmd](https://wordpress.org/support/users/ahmedcmd/)
 * (@ahmedcmd)
 * [6 years, 4 months ago](https://wordpress.org/support/topic/php-fatal-error-freemiusget_api_user_scope_by_user/)
 * Hi,
 * Suddenly I’m receiving a PHP error in the premium plugin
 * >  PHP Fatal error: Uncaught TypeError: Argument 1 passed to Freemius::get_api_user_scope_by_user()
   > must be an instance of FS_User, bool given called in ***/woo-permalink-manager-
   > premium/freemius/includes/class-freemius.php on line 20787 and defined in ***/
   > woo-permalink-manager-premium/freemius/includes/class-freemius.php:20801
 * I’ve temporarily fixed this by removing the Class definition ‘FS_User’ for the
   argument in the private function
 * >  /**
   >  * [@author](https://wordpress.org/support/users/author/) Vova Feldman(
   > @svovaf) * [@since](https://wordpress.org/support/users/since/) 2.0.0 * * [@param](https://wordpress.org/support/users/param/)\
   > FS_User $user * * [@return](https://wordpress.org/support/users/return/) \FS_Api*///
   > FS_User private function get_api_user_scope_by_user( $user ) { return FS_Api::
   > instance( $this->_module_id, ‘user’, $user->id, $user->public_key, ! $this-
   > >is_live(), $user->secret_key, $this->get_sdk_version() ); }
 * PHP version: 7.3.6
    WooCommerce version: 3.6.4 Wordpress version: 5.2.1 Plugin
   version: 2.1.12
 * Do you know what’s wrong? Thanks!
    -  This topic was modified 6 years, 4 months ago by [ahmedcmd](https://wordpress.org/support/users/ahmedcmd/).

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

 *  Plugin Author [Premmerce](https://wordpress.org/support/users/premmerce/)
 * (@premmerce)
 * [6 years, 4 months ago](https://wordpress.org/support/topic/php-fatal-error-freemiusget_api_user_scope_by_user/#post-12386419)
 * Hi [@ahmedcmd](https://wordpress.org/support/users/ahmedcmd/)
 * Sorry for the long answer. We have already contacted Freemius and are awaiting
   their response.
 *  [Leo Fajardo](https://wordpress.org/support/users/leorw/)
 * (@leorw)
 * [6 years, 4 months ago](https://wordpress.org/support/topic/php-fatal-error-freemiusget_api_user_scope_by_user/#post-12388534)
 * Hi [@ahmedcmd](https://wordpress.org/support/users/ahmedcmd/),
 * This is Leo from Freemius. Please contact support AT freemius DOT com because
   we need further information that cannot be shared publicly.
 * Thanks
 *  [kisoro](https://wordpress.org/support/users/kisoro/)
 * (@kisoro)
 * [6 years, 1 month ago](https://wordpress.org/support/topic/php-fatal-error-freemiusget_api_user_scope_by_user/#post-12786064)
 * Hello everyone,
 * I also ran into this error that my site is now down. here is the error
 * “Fatal error: Uncaught TypeError: Argument 1 passed to Freemius::get_api_user_scope_by_user()
   must be an instance of FS_User, boolean given, called in /home/wild0620/public_html/
   wp-content/plugins/svg-flags-lite/freemius/includes/class-freemius.php on line
   22016 and defined in /home/wild0620/public_html/wp-content/plugins/svg-flags-
   lite/freemius/includes/class-freemius.php:22030 Stack trace: #0 /home/wild0620/
   public_html/wp-content/plugins/svg-flags-lite/freemius/includes/class-freemius.
   php(22016): Freemius->get_api_user_scope_by_user(false) #1 /home/wild0620/public_html/
   wp-content/plugins/svg-flags-lite/freemius/includes/class-freemius.php(22055):
   Freemius->get_api_user_scope(false) #2 /home/wild0620/public_html/wp-content/
   plugins/svg-flags-lite/freemius/includes/class-freemius.php(19084): Freemius-
   >get_current_or_network_user_api_scope() #3 /home/wild0620/public_html/wp-content/
   plugins/svg-flags-lite/freemius/includes/class-freemius.php(11125): Freemius-
   >_fetch_plugin_plans() #4 /home/wild0620/public_html/wp-content/plug in /home/
   wild0620/public_html/wp-content/plugins/svg-flags-lite/freemius/includes/class-
   freemius.php on line 22030
 * Can anyone please help or has anyone solved this kind of problem? please need
   help

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

The topic ‘PHP Fatal error: Freemius::get_api_user_scope_by_user()’ is closed to
new replies.

 * ![](https://ps.w.org/woo-permalink-manager/assets/icon-256x256.png?rev=1840668)
 * [Premmerce Permalink Manager for WooCommerce](https://wordpress.org/plugins/woo-permalink-manager/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/woo-permalink-manager/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/woo-permalink-manager/)
 * [Active Topics](https://wordpress.org/support/plugin/woo-permalink-manager/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/woo-permalink-manager/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/woo-permalink-manager/reviews/)

 * 3 replies
 * 4 participants
 * Last reply from: [kisoro](https://wordpress.org/support/users/kisoro/)
 * Last activity: [6 years, 1 month ago](https://wordpress.org/support/topic/php-fatal-error-freemiusget_api_user_scope_by_user/#post-12786064)
 * Status: not resolved