Issue when running WP CLI (this time with fix)
-
In the
rma-wordpress.phpfile, there’s a reference to load composer’s autoload on line 33:require_once 'vendor/autoload.php';A relative path (
'vendor/autoload.php') can work fine in normal plugin loads, but fail under WP-CLI if the current working directory isn’t where you think it is.WP CLI is very literal about file paths, so this line should be getting the plugin directory:
require_once plugin_dir_path(__FILE__) . 'vendor/autoload.php';This fixes my issue I posted earlier, and everything works as intended.
Hopefully that helps!
Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
The topic ‘Issue when running WP CLI (this time with fix)’ is closed to new replies.