• Resolved Matt Neal

    (@mattfromrealcoder)


    In the rma-wordpress.php file, 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)
  • Plugin Author Tom Stones

    (@tbstones)

    Morning Matt,

    I have applied this fix to 1.6.4, however, I had never been able to replicate the issue you were having with WP-Cli, so can you please confirm that this fixes the issue that you were having before i close the ticket?

    Thanks

    Thread Starter Matt Neal

    (@mattfromrealcoder)

    Oh that was fast, I’ll try now @tbstones

    Yep! That fixed it! Thank you so much! We rely on the WP CLI for a lot of our websites, so this helps immensley. Now we don’t have to edit any plugins directly haha.

    I reverted back to the previous version before your update and it fails, then back to the new one and I don’t get any errors ??

    Thanks again.

    • This reply was modified 4 days, 12 hours ago by Matt Neal.
    Plugin Author Tom Stones

    (@tbstones)

    Yeah, you had done all the work!

    Plugin Author Tom Stones

    (@tbstones)

    Oh awesome.

    let me know if there is anything else. I just invested heavily in our build and release pipeline, so these changes are a lot easier now

    • This reply was modified 4 days, 12 hours ago by Tom Stones.
Viewing 4 replies - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.