Fatal Error
-
I receive this fatal error when I activate this plugin,
Fatal error: Uncaught Error: Call to undefined function Richardevcom\Apsfc\pll_current_language() in C:\xampp\htdocs\wp\wp-content\plugins\add-polylang-support-for-customizer\includes\class-apsfc.php:136 Stack trace: #0 C:\xampp\htdocs\wp\wp-content\plugins\add-polylang-support-for-customizer\includes\class-apsfc.php(250): Richardevcom\Apsfc\Apsfc->get_custom_customizer_option() #1 C:\xampp\htdocs\wp\wp-includes\class-wp-hook.php(309): Richardevcom\Apsfc\Apsfc->on_option_theme_mods_get(Array) #2 C:\xampp\htdocs\wp\wp-includes\plugin.php(191): WP_Hook->apply_filters(Array, Array) #3 C:\xampp\htdocs\wp\wp-includes\option.php(229): apply_filters('option_theme_mo...', Array, 'theme_mods...')
After trying to trace the issue, I was able to fix this issue by changing the init code of the Polylang plugin, which was originally
add_action( 'plugins_loaded', array( $this, 'init' ), 1 );
to$this->init();
so that the polylang plugin runs immediately without waiting for the plugin_loaded action. It appears that your plugin is running before the polylang plugin and caused this issue.
- The topic ‘Fatal Error’ is closed to new replies.