Freemius / wordpress-sdk

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

Support for playground #693

Open Mte90 opened 3 months ago

Mte90 commented 3 months ago

🚀 feature request

Description

Add the support to disable the license wizard on WordPress playground instances. https://wordpress.org/playground/

Now it is opt-in by developers compared when happened that they pushed to everyone automatically. On november they launched the new integration with the wordpress repository https://make.wordpress.org/meta/2023/11/22/plugin-directory-preview-button-revisited/

Describe the solution you'd like

Adding a constant in the blueprint.json as https://github.com/WordPress/wordpress-playground/issues/483 so it will happen automatically.

Mte90 commented 2 months ago

@vovafeldman @swashata you can test a plugin with the freemius sdk with ours on: https://playground.wordpress.net/?plugin=glossary-by-codeat&blueprint-url=https://wordpress.org/plugins/wp-json/plugins/v1/plugin/glossary-by-codeat/blueprint.json?rev=3066781

As you can see the data are imported of the glossary post type but is required to skip the Freemius modal box after activating. It would be nice a way to not show the modal itself in this scenario, I need that to open the live preview for our plugin.

kylegilman commented 2 months ago

I ran into the same problem, so I added a constant to my Videopack plugin 'VIDEOPACK_FREEMIUS_ENABLED' that checks if Freemius should be enabled, then set that constant to false in my blueprint.

Mte90 commented 2 months ago

A suggestion https://github.com/TablePress/TablePress/blob/main/tablepress.php#L85 is to use the anonymous_mode that disables this kind of warning with that constant.