Support

Search results for ""

Sorry, no results found. Perhaps you would like to search the documentation?
All Topics
administratiedoetinchem

BUG Report: automatic updates in Pro version using WP-CLI and wp_cron / cronjobs

Automatic updates will not work when they, their to update their transient data, using the wp cli
which is triggered on

wp plugin list

This is because on

admin-columns-pro/admin-columns-pro.php
admin-columns-pro/admin-columns/codepress-admin-columns.php

There is a statement that aborts the loading of the plugin, if it’s not in the admin section.

if ( ! is_admin() ) {
return false;
}

This if performance wise, a very good idea.. , this will also cause that your updates are not scheduled the right way with WP Cron, especially on high traffic site, where WP is moved to a real cronjob.

It should be considered, and would be appreciate, that Admin Columns Pro plugin would register the hooks for update checks always..

And load the remaining required code, like license manager etc on invokement of this update process only.
To keep the performance impact at the public side, to an absolute minimum.

For WP CLI only would be an easy fix to replace it to this:

if ( ! is_admin() && ! defined(‘WP_CLI’) ) {
return false;
}

We would appreciate this fix.

Thanks
Danny Ebbers

5 years, 10 months ago
Stefan van den Dungen Gronovius
Developer

Hi Danny,

Thank you so much for your feedback and insights on this matter.
I already created a ticket for this, but I’m not sure if the WP_CLI check is sufficient to make everything work. Or did you already try this out? A lot of our code is dependent on the admin (of course) but I believe there are also more checks that can be made available when our plugin is triggered by wp cli. Anyway I will attach this topic to the issue on github so we have a better look at this. Thanks again for your input. If you like to follow the Github Ticket, here’s the link:

https://github.com/codepress/admin-columns-issues/issues/1087

5 years, 10 months ago

You must be logged in to reply to this topic.