Freemius / wordpress-sdk

https://freemius.com
GNU General Public License v3.0
267 stars 77 forks source link

WP Theme Test compatibility - Fatal Error: Call to undefined function wp_get_current_user() #353

Open BrechtVds opened 5 years ago

BrechtVds commented 5 years ago

Actual Behavior:

Versions: (*)

Plugin / Theme:

Additional Information:

vovafeldman commented 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.