Skip to content
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

Blueprint: installPlugin step from URL file not working #2141

Open
bph opened this issue Feb 7, 2025 · 1 comment
Open

Blueprint: installPlugin step from URL file not working #2141

bph opened this issue Feb 7, 2025 · 1 comment
Labels
[Package][@wp-playground] Blueprints [Type] Bug An existing feature does not function as intended

Comments

@bph
Copy link
Collaborator

bph commented Feb 7, 2025

The [documentation on installPlugin] step(https://wordpress.github.io/wordpress-playground/blueprints/steps#InstallPluginSte) provides this information

Parameters
ifAlreadyInstalled – What to do if the asset already exists.
options (InstallPluginOptions) – Optional installation options.
pluginData – The plugin files to install. It can be a plugin zip file, a single PHP file, or a directory containing all the plugin files at its root.
pluginZipFile (FileResource) – @deprecated.

During the audit of blueprints in the gallery, I tried to modify Install plugin from gist blueprint

{
    "step": "installPlugin",
         "pluginData": {
             "resource": "url",
                  "url":        "https://gist.githubusercontent.com/ndiego/456b74b243d86c97cda89264c68cbdee/raw/ff00cf25e6eebe4f5a4eaecff10286f71e65340b/block-hooks-demo.php"
          },
          "options": {
          "activate": true
        }

... which wouldn't work, although the docs say "It can be a plugin zip file, a single PHP file, or a directory containing all the plugin files at its root."
Only using writeFile and a separate step activatePlugin would make this work.

@bph bph added [Package][@wp-playground] Blueprints [Type] Bug An existing feature does not function as intended labels Feb 7, 2025
@bph
Copy link
Collaborator Author

bph commented Feb 7, 2025

#2140 asks to enhance the blueprint to use gist.github.com/[username]/[gistid]

@bph bph changed the title Blueprint: installPlugin step from Gist not working Blueprint: installPlugin step from URL file not working Feb 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Package][@wp-playground] Blueprints [Type] Bug An existing feature does not function as intended
Projects
Status: Inbox
Development

No branches or pull requests

1 participant