aaemnnosttv / wp-cli-login-command

Log in to WordPress with secure passwordless magic links.
https://aaemnnost.tv/wp-cli-commands/login/
MIT License
292 stars 47 forks source link

Login command not working using mu-plugin #45

Closed oxyc closed 2 years ago

oxyc commented 2 years ago

Seems the plugin version ensure check doesnt look at the mu-plugin path.

https://github.com/aaemnnosttv/wp-cli-login-command/blob/master/src/LoginCommand.php#L471

aaemnnosttv commented 2 years ago

Hi there! Are you experiencing a problem? If you follow the method that you linked there, you should see that it checks for the mu-plugin first.

oxyc commented 2 years ago

Aah sorry, I missed that.

I'm guessing it's because I used composer installers to move it into the mu-plugin folder.


    "installer-paths": {
      "web/app/mu-plugins/{$name}/": [
         "type:wordpress-muplugin",
         "aaemnnosttv/wp-cli-login-server"
       ],

But that places it in a subdirectory mu-plugins/wp-cli-login-server/wp-cli-login-server.php so the mustUse existance check fails since it assumes it's a single file.

That's fine though, I can do it with the drop-in installer instead.