Advertisement

Use the WP_Query in WP CLI command

In this article let’s learn about how to execute the WP_Query into the WP CLI commands. Note: If you read some recent articles then you can skip some below steps that are related to plugin creation. Register WP CLI Command Register PHP class WordPress_Examples_WP_CLI e.g. if ( ! class_exists( ‘WordPress_Examples_WP_CLI’ ) && class_exists( ‘WP_CLI_Command’ )