-
Notifications
You must be signed in to change notification settings - Fork 14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conflict if used in a WordPress site where another plugin has activated freemius wordpress sdk #14
Comments
I'll close this - it was actually a conflict with another plugin using Freemius API - needed to check class |
I will re open - as it is an incompatibility betweem php-sdk and wordpress-sdk The Freemius_Api_Base differs between SDks as in php-sdk it has a method Test but in wordpress-sdk the base classes doesnt not have a method Test - but the class Freemius_Api_WordPres extends Freemius_Api_Base with a static method Test Ideally Freemius_Api_Base should be the same in both libraries and the Test extended in a simplar way. |
I just encountered this too |
Same here! |
I am facing the same issue! Is there any fix available for this? |
My workaround was to edit the code in the Freemius PHP SDK so it was namespaced |
And actually, I didn’t do those changes myself. Leo from Freemius did it and sent me the modified copy. If you ask Freemius support they can send you that copy (or maybe they’ll see this is a more general issue that merits fixing more permanently.) |
A better solution to name space - perhaps if should just be updated in the library here? |
Just encountered this too |
Yes this library is unsafe to use in a wordpress site, plugin or theme - should use the WordPress SDK instead. I only use this library on non WordPress apps where I want to access freemius data |
Same problem, Any solution? |
The solution is not to use this library in WordPress use this https://github.com/Freemius/wordpress-sdk instead |
Hi @alanef Just tested the same result, what should I do now? |
I don't understand what you mean. If you are not using the library in WP then you can't get the message. Have you gone through the normal steps of debugging / searching? In any case a mentioned don't use the library in WP, which means don't use any plugin or theme that incorrectly loads the library. |
If used in a wordpress site that has active plugins that use freemius wordpress-sdk there is a conflict
[17-Jan-2020 14:11:11 UTC] PHP Fatal error: Cannot make non static method Freemius_Api_Base::Test() static in class Freemius_Api_WordPress in /home/badlywi
red/public_html/wp-content/plugins/fullworks-anti-spam-pro/includes/vendor/freemius/wordpress-sdk/includes/sdk/FreemiusWordPress.php on line 704
[17-Jan-2020 14:11:11 UTC] PHP Stack trace:
[17-Jan-2020 14:11:11 UTC] PHP 1. {main}() /home/mydomain/public_html/wp-admin/plugins.php:0
[17-Jan-2020 14:11:11 UTC] PHP 2. require_once() /home/mydomain/public_html/wp-admin/plugins.php:10
[17-Jan-2020 14:11:11 UTC] PHP 3. do_action() /home/mydomain/public_html/wp-admin/admin.php:367
[17-Jan-2020 14:11:11 UTC] PHP 4. WP_Hook->do_action() /home/mydomain/public_html/wp-includes/plugin.php:478
[17-Jan-2020 14:11:11 UTC] PHP 5. WP_Hook->apply_filters() /home/mydomain/public_html/wp-includes/class-wp-hook.php:312
[17-Jan-2020 14:11:11 UTC] PHP 6. wp_update_plugins() /home/mydomain/public_html/wp-includes/class-wp-hook.php:288
[17-Jan-2020 14:11:11 UTC] PHP 7. set_site_transient() /home/mydomain/public_html/wp-includes/update.php:334
[17-Jan-2020 14:11:11 UTC] PHP 8. apply_filters() /home/mydomain/public_html/wp-includes/option.php:1832
[17-Jan-2020 14:11:11 UTC] PHP 9. WP_Hook->apply_filters() /home/mydomain/public_html/wp-includes/plugin.php:206
[17-Jan-2020 14:11:11 UTC] PHP 10. FS_Plugin_Updater->pre_set_site_transient_update_plugins_filter() /home/mydomain/public_html/wp-includes/class-wp-hook
.php:290
[17-Jan-2020 14:11:11 UTC] PHP 11. Freemius->get_update() /home/mydomain/public_html/wp-content/plugins/fullworks-anti-spam-pro/includes/vendor/freemius/
wordpress-sdk/includes/class-fs-plugin-updater.php:517
[17-Jan-2020 14:11:11 UTC] PHP 12. Freemius->check_updates() /home/mydomain/public_html/wp-content/plugins/fullworks-anti-spam-pro/includes/vendor/freemi
us/wordpress-sdk/includes/class-freemius.php:18962
[17-Jan-2020 14:11:11 UTC] PHP 13. Freemius->_fetch_newer_version() /home/mydomain/public_html/wp-content/plugins/fullworks-anti-spam-pro/includes/vendor
/freemius/wordpress-sdk/includes/class-freemius.php:20514
[17-Jan-2020 14:11:11 UTC] PHP 14. Freemius->_fetch_latest_version() /home/mydomain/public_html/wp-content/plugins/fullworks-anti-spam-pro/includes/vendo
r/freemius/wordpress-sdk/includes/class-freemius.php:18917
[17-Jan-2020 14:11:11 UTC] PHP 15. Freemius->get_api_site_or_plugin_scope() /home/mydomain/public_html/wp-content/plugins/fullworks-anti-spam-pro/include
s/vendor/freemius/wordpress-sdk/includes/class-freemius.php:20358
[17-Jan-2020 14:11:11 UTC] PHP 16. Freemius->get_api_site_scope() /home/mydomain/public_html/wp-content/plugins/fullworks-anti-spam-pro/includes/vendor/f
reemius/wordpress-sdk/includes/class-freemius.php:21644
The text was updated successfully, but these errors were encountered: