Skip to content
This repository has been archived by the owner on Aug 14, 2023. It is now read-only.

Plugins update conflict due to "last_checked = current_time( 'timestamp' );" #40

Open
hiddenpearls opened this issue Dec 16, 2017 · 2 comments

Comments

@hiddenpearls
Copy link

Hi @pippinsplugins

I am using EDD_SL_Plugin_Updater class in my plugins but It is being conflicted with Elegant Themes and Plugins.

After a deep debugging with EDD and Elegant themes, I found this code below

$_transient_data->last_checked = current_time( 'timestamp' );

works if I change the current_time( 'timestamp' ); to time();

time() is being used in wp_update_plugins() as well.

So, I think time() should be used instead of current_time( 'timestamp' ); at all places.

Looking forward,

@nobleclem
Copy link

The replacement of current_time('timestamp') to time() does work but is unnecessary.

At the beginning of the wp_update_plugins() call $new_option->last_checked = time() happens then at the bottom of the wp_update_plugins() call the $new_option value is saved as the update_plugins transient, which is when the check_update() and other plugin custom update calls happen, its not necessary to update the last_updated value again (currently incorrectly) to essentially the same value as it was when wp_update_plugins() call happened.

Hope this makes sense.

@hiddenpearls
Copy link
Author

hiddenpearls commented Apr 8, 2018

@pippinsplugins @cklosowski thoughts?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants