wordpress-sdk
wordpress-sdk copied to clipboard
PHP Fatal error: Uncaught Error: Call to undefined function get_theme_root()
🐞 bug report
Behavior:
A customer reported the following issue occurring on their site: PHP Fatal error: Uncaught Error: Call to undefined function get_theme_root() in /<path>/vendor/freemius/wordpress-sdk/start.php:56.php
Line 56 is the following:
$themes_directory = get_theme_root( get_stylesheet() );
It looks like, in some cases, function get_theme_root() might not be present when the Freemius SDK is initialised (i.e. when the plugin includes it, on load). It would be worth investigating the condition in which this occurs, so that the error can be prevented.
Versions: (*)
-
Freemius SDK Version:2.4.2 -
WordPress Version:5.7.2 -
PHP Version:7.4.21
Plugin / Theme: (*)
-
Name:Aelia Currency Switcher for WooCommerce -
Freemius ID:6708