Merge pull request #20821 from woocommerce/fix/20718
Pass an instance of the background updater to the db update callbacks
This commit is contained in:
commit
ea2b3f9d7a
|
@ -106,7 +106,7 @@ class WC_Background_Updater extends WC_Background_Process {
|
|||
|
||||
if ( is_callable( $callback ) ) {
|
||||
$logger->info( sprintf( 'Running %s callback', $callback ), array( 'source' => 'wc_db_updates' ) );
|
||||
$result = (bool) call_user_func( $callback );
|
||||
$result = (bool) call_user_func( $callback, $this );
|
||||
|
||||
if ( $result ) {
|
||||
$logger->info( sprintf( '%s callback needs to run again', $callback ), array( 'source' => 'wc_db_updates' ) );
|
||||
|
|
Loading…
Reference in New Issue