Skip to content

Add requires_php to the wp plugin list --update=available outputΒ #428

@dd32

Description

@dd32

The following command can be used to list out plugin updates:

wp plugin list --update=available

but it includes plugins which are incompatible with the current site, due to either the requires or requires_php field values.

It would be helpful to be able to add the following fields to the output if supported:

  • requires_php
  • requires
  • tested
  • requires_plugins (plugin dependencies)

The update API appears to only return requires for no-update plugins and not the requires_php/tested/requires_plugins (this can be fixed) but expanding the data would be helpful.

It would additionally be useful to be able to filter plugins based on those fields, such as --update=available --canbeinstalled or something of the sort, for example, if a plugin requires PHP 8 but I'm running PHP 7.4 I don't want it included. I don't know how best to achieve that.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions