Title: PHP Fatal error: Uncaught Error: Call to undefined function get_plugin_data()
Last modified: March 24, 2022

---

# PHP Fatal error: Uncaught Error: Call to undefined function get_plugin_data()

 *  Resolved [Rhand](https://wordpress.org/support/users/rhand/)
 * (@rhand)
 * [4 years, 2 months ago](https://wordpress.org/support/topic/php-fatal-error-uncaught-error-call-to-undefined-function-get_plugin_data/)
 * Testing PHPH 8.1 and we have OMGF Pro. We now see this error
 * `[24-Mar-2022 06:32:26 UTC] PHP Fatal error: Uncaught Error: Call to undefined
   function get_plugin_data() in /home/wp_fjg2if/sitecom.stage.site/wp-content/plugins/
   host-google-fonts-pro/includes/class-omgf-pro.php:258`
 *     ```
       Stack trace:
       #0 /home/wp_fjg2if/sitecom.stage.site/wp-includes/class-wp-hook.php(307): OmgfPro->check_dependencies('')
       #1 /home/wp_fjg2if/sitecom.stage.site/wp-includes/class-wp-hook.php(331): WP_Hook->apply_filters(NULL, Array)
       #2 /home/wp_fjg2if/sitecom.stage.site/wp-includes/plugin.php(474): WP_Hook->do_action(Array)
       #3 /home/wp_fjg2if/sitecom.stage.site/wp-settings.php(587): do_action('init')
       #4 /home/wp_fjg2if/sitecom.stage.site/wp-config.php(92): require_once('/home/wp_fjg2if...')
       #5 /home/wp_fjg2if/sitecom.stage.site/wp-load.php(50): require_once('/home/wp_fjg2if...')
       #6 /home/wp_fjg2if/sitecom.stage.site/wp-admin/admin.php(34): require_once('/home/wp_fjg2if...')
       #7 /home/wp_fjg2if/sitecom.stage.site/wp-admin/index.php(10): require_once('/home/wp_fjg2if...')
       #8 {main}
         thrown in /home/wp_fjg2if/sitecom.stage.site/wp-content/plugins/host-google-fonts-pro/includes/class-omgf-pro.php on line 258
       ```
   
 * License manager directory ffwp-license-manager / plugin is there.. so not sure
   why
 *     ```
       $inactive_plugin = array_search(false, $required_plugins);
   
       if ($inactive_plugin) {
       $plugin_name = get_plugin_data(OMGF_PRO_PLUGIN_FILE)['Name'];
   
       // Clear all previously set notices.
   
       delete_transient(OmgfPro_Admin_Notice::OMGF_PRO_ADMIN_NOTICE_TRANSIENT);
   
       OmgfPro_Admin_Notice::set_pro_notice(sprintf(__('<strong>%s</strong> needs to be installed and active for %s to function properly. Please make sure it\'s installed and activated, before activating %s.', $this->plugin_text_domain), $inactive_plugin, $plugin_name, $inactive_plugin), 'error', 'omgf_pro_license_manager_not_active');
   
       deactivate_plugins(OMGF_PRO_PLUGIN_BASENAME);
   
       $this->init = false;
   
       return;
       }
       ```
   
 * is causing issues
 * Not sure why it would be undefined all of the sudden here and if this could be
   related to PHP 8.1 but would love some feedback.
    -  This topic was modified 4 years, 2 months ago by [Rhand](https://wordpress.org/support/users/rhand/).
    -  This topic was modified 4 years, 2 months ago by [Rhand](https://wordpress.org/support/users/rhand/).
    -  This topic was modified 4 years, 2 months ago by [Rhand](https://wordpress.org/support/users/rhand/).
    -  This topic was modified 4 years, 2 months ago by [Rhand](https://wordpress.org/support/users/rhand/).
    -  This topic was modified 4 years, 2 months ago by [Rhand](https://wordpress.org/support/users/rhand/).

Viewing 4 replies - 16 through 19 (of 19 total)

[←](https://wordpress.org/support/topic/php-fatal-error-uncaught-error-call-to-undefined-function-get_plugin_data/?output_format=md)
[1](https://wordpress.org/support/topic/php-fatal-error-uncaught-error-call-to-undefined-function-get_plugin_data/?output_format=md)
2

 *  Plugin Author [Daan van den Bergh](https://wordpress.org/support/users/daanvandenbergh/)
 * (@daanvandenbergh)
 * [4 years, 2 months ago](https://wordpress.org/support/topic/php-fatal-error-uncaught-error-call-to-undefined-function-get_plugin_data/page/2/#post-15522980)
 * Okay, so this isn’t caused by OMGF. This stylesheet is loaded by Elementor. Probably
   after migrating to the staging site you’d need to regenerate Elementor’s CSS 
   files or something.
 *  Thread Starter [Rhand](https://wordpress.org/support/users/rhand/)
 * (@rhand)
 * [4 years, 2 months ago](https://wordpress.org/support/topic/php-fatal-error-uncaught-error-call-to-undefined-function-get_plugin_data/page/2/#post-15522987)
 * True it seems [@daanvandenbergh](https://wordpress.org/support/users/daanvandenbergh/).
   Regenerated Elementor CSS and files, emptied WP Rocket and now we are up and 
   running again. Do not see any console errors now. Will mark this thread as solved
   for now as OMGF Pro seems to work now and run on PHP 8.1. Thanks you!
 *  Plugin Author [Daan van den Bergh](https://wordpress.org/support/users/daanvandenbergh/)
 * (@daanvandenbergh)
 * [4 years, 2 months ago](https://wordpress.org/support/topic/php-fatal-error-uncaught-error-call-to-undefined-function-get_plugin_data/page/2/#post-15522992)
 * Awesome!
 *  Plugin Author [Daan van den Bergh](https://wordpress.org/support/users/daanvandenbergh/)
 * (@daanvandenbergh)
 * [4 years, 2 months ago](https://wordpress.org/support/topic/php-fatal-error-uncaught-error-call-to-undefined-function-get_plugin_data/page/2/#post-15525014)
 * Btw. When you have the time, would you mind [writing a review](https://wordpress.org/support/plugin/host-webfonts-local/reviews/#new-post)?
   It’d greatly help me and my work. Thanks!

Viewing 4 replies - 16 through 19 (of 19 total)

[←](https://wordpress.org/support/topic/php-fatal-error-uncaught-error-call-to-undefined-function-get_plugin_data/?output_format=md)
[1](https://wordpress.org/support/topic/php-fatal-error-uncaught-error-call-to-undefined-function-get_plugin_data/?output_format=md)
2

The topic ‘PHP Fatal error: Uncaught Error: Call to undefined function get_plugin_data()’
is closed to new replies.

 * ![](https://ps.w.org/host-webfonts-local/assets/icon-256x256.png?rev=3300821)
 * [OMGF | GDPR/DSGVO Compliant, Faster Google Fonts. Easy.](https://wordpress.org/plugins/host-webfonts-local/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/host-webfonts-local/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/host-webfonts-local/)
 * [Active Topics](https://wordpress.org/support/plugin/host-webfonts-local/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/host-webfonts-local/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/host-webfonts-local/reviews/)

 * 19 replies
 * 2 participants
 * Last reply from: [Daan van den Bergh](https://wordpress.org/support/users/daanvandenbergh/)
 * Last activity: [4 years, 2 months ago](https://wordpress.org/support/topic/php-fatal-error-uncaught-error-call-to-undefined-function-get_plugin_data/page/2/#post-15525014)
 * Status: resolved