wordpress-sdk
wordpress-sdk copied to clipboard
SDK newest version load when there's a network and site activated Freemius powered plugins.
Multi-site network activated plugin are always loaded prior to site plugins so if there's a a plugin activated in the network mode that has an older version of the SDK of another plugin which is site activated that has new SDK version, the fs-essential-functions.php will be loaded from the older SDK.
Same thing about MU plugins (loaded even before network activated plugins).
This is tricky, library dependency is hard in WP.
My solution is to run each library in each (unique) instance. In my updater solution, https://github.com/turtlepod/fx-updater/blob/master/includes/updater.php I add in docs:
VERY IMPORTANT: Make sure you change the class name with your own theme prefix.
But I don't think this solution is suitable for Freemius.
One thing to consider, is ability to create "bundle", single plugin to update multiple plugins/themes. Like this: https://genbumedia.com/docs/fx-updater-groups/
This way theme/plugin shop with multiple product can ship all in single plugin. This will potentially reduce the instance of freemius in a site (?) (do freemius already have this feature ? can this be done using "add-on" feature?)
Just random idea: Maybe load using hook (like init, priority 1, and capture all instance in priority 999, and get the latest version?) before loading. Or use version number as hook priority?