Open BrechtVds opened 5 years ago
@BrechtVds thanks for reporting.
From what it looks, based on get_stylesheet()
documentation there's no restriction with regards to when the function can be executed. It seems like WP Theme Test adds a filter to 'stylesheet'
, which eventually triggers current_user_can('administrator')
on their end. So unless I'm missing something, they need to patch that logic to test if current_user_can()
was already defined before calling it.
Actual Behavior:
What is the issue? (*)
Getting the following site wide error when both WP Theme Test and the Freemius SDK are active:Fatal error: Uncaught Error: Call to undefined function wp_get_current_user() in /app/public/wp-includes/capabilities.php:640
Versions: (*)
Freemius SDK Version:
2.3.0WordPress Version:
5.2.2PHP Version:
7.3.2WP Theme Test:
1.1.0Plugin / Theme:
Name:
WP Ultimate RecipeSlug:
wp-ultimate-recipeFreemius ID:
3573Additional Information:
Browser Type: (*)
SafariBrowser Version: (*)
12.1OS: (*)
macOS Mojave 10.14.4Stack Traces:
0 /app/public/wp-content/plugins/wp-theme-test/classes/class.core.php(48): current_user_can('administrator')
1 /app/public/wp-content/plugins/wp-theme-test/wp-theme-test.php(69): WPTT_Core->has_capability()
2 /app/public/wp-content/plugins/wp-theme-test/wp-theme-test.php(108): WP_Theme_Test->apply_test_theme()
3 /app/public/wp-includes/class-wp-hook.php(286): WP_Theme_Test->stylesheet_filter('twentyseventeen')
4 /app/public/wp-includes/plugin.php(208): WP_Hook->apply_filters('twentyseventeen', Array)
5 /app/public/wp-includes/theme.php(176): apply_filters('stylesheet', 'twentyseventeen')
6 /app/public/wp-content/plugins/wp-ultimate-recipe-premium/freemius/start.php(56): get_stylesheet()
7 /app/public/wp-content/plugins/wp-ultimate-recipe-premium/wp-ultimate-recipe-premium.php(121): require_once('/app/public/wp-...')
8 /app/public/wp-content/plugins/wp-ultimate-recipe-premium/w in /app/public/wp-includes/capabilities.php on line 640