Title: Fatal Error
Last modified: July 11, 2022

---

# Fatal Error

 *  Resolved [czysta](https://wordpress.org/support/users/czysta/)
 * (@czysta)
 * [3 years, 11 months ago](https://wordpress.org/support/topic/fatal-error-4199/)
 * 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.

Viewing 1 replies (of 1 total)

 *  Plugin Author [richardevcom](https://wordpress.org/support/users/richardevcom/)
 * (@richardevcom)
 * [3 years, 11 months ago](https://wordpress.org/support/topic/fatal-error-4199/#post-15815779)
 * Hi there. Thank you for posting. We had this issue in previous versions – could
   you please verify your current Polylang and our plugin version?
 * If indeed newer – would you be interested into making pull request in our Github
   repo? Otherwise – I really appreciate you fixing it and if the issue indeed is
   on latest, I’ll gladly update it tomorrow for everyone!

Viewing 1 replies (of 1 total)

The topic ‘Fatal Error’ is closed to new replies.

 * ![](https://ps.w.org/add-polylang-support-for-customizer/assets/icon-256x256.
   png?rev=2305208)
 * [Add Polylang support for Customizer](https://wordpress.org/plugins/add-polylang-support-for-customizer/)
 * [Support Threads](https://wordpress.org/support/plugin/add-polylang-support-for-customizer/)
 * [Active Topics](https://wordpress.org/support/plugin/add-polylang-support-for-customizer/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/add-polylang-support-for-customizer/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/add-polylang-support-for-customizer/reviews/)

 * 1 reply
 * 2 participants
 * Last reply from: [richardevcom](https://wordpress.org/support/users/richardevcom/)
 * Last activity: [3 years, 11 months ago](https://wordpress.org/support/topic/fatal-error-4199/#post-15815779)
 * Status: resolved