Correct code to run again

This commit is contained in:
Mike Jolley 2018-05-25 16:36:07 +01:00
parent 083c994732
commit 048b95e135
2 changed files with 3 additions and 3 deletions

View File

@ -93,7 +93,7 @@ class WC_Background_Updater extends WC_Background_Process {
* item from the queue.
*
* @param string $callback Update callback function.
* @return mixed
* @return string|bool
*/
protected function task( $callback ) {
wc_maybe_define_constant( 'WC_UPDATING', true );
@ -117,7 +117,7 @@ class WC_Background_Updater extends WC_Background_Process {
$logger->notice( sprintf( 'Could not find %s callback', $callback ), array( 'source' => 'wc_db_updates' ) );
}
return $result;
return $result ? $callback : false;
}
/**

View File

@ -1718,7 +1718,7 @@ function wc_update_340_states() {
/**
* Update next state in the queue.
*
* @return void
* @return bool True to run again, false if completed.
*/
function wc_update_340_state() {
global $wpdb;