Skip to content

Blueprint: installPlugin step from URL file not working #2141

@bph

Description

@bph

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.

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions