You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Register command execution points using named WP-CLI hooks #15
Having a plugin for each project in our company, we want to extend some commands. db import is one of them. After this three other commands need to run. So it would be great if the import runs after plugins were loaded.
Just a small note on wp db subcommands using @WP_CLI::get_runner()->load_wordpress(); (note the error suppression with @): if there is a function definition present in wp-config.php these subcommands will fail, yielding no output at all. The error becomes clear when removing the @, e.g. Fatal error: Cannot redeclare functionname()
Activity
Fix for wp-cli#15.
ScreamingDev commentedon Aug 19, 2017
Having a plugin for each project in our company, we want to extend some commands.
db importis one of them. After this three other commands need to run. So it would be great if the import runs after plugins were loaded.danielbachhuber commentedon Aug 20, 2017
We probably won't be changing the behavior of
wp db import, so I'd encourage you to find a different approach.diggy commentedon Aug 25, 2017
Just a small note on
wp dbsubcommands using@WP_CLI::get_runner()->load_wordpress();(note the error suppression with@): if there is a function definition present in wp-config.php these subcommands will fail, yielding no output at all. The error becomes clear when removing the@, e.g.Fatal error: Cannot redeclare functionname()https://wordpress.slack.com/archives/C02RP4T41/p1503590888000029
Fix for #15.