Action_Scheduler\Migration
Runner::run
Run migration batch.
Method of the class: Runner{}
No Hooks.
Returns
Int. Size of batch processed.
Usage
$Runner = new Runner(); $Runner->run( $batch_size );
- $batch_size(int)
- Optional batch size.
Default:10
Runner::run() Runner::run code WC 10.6.2
public function run( $batch_size = 10 ) {
$batch = $this->batch_fetcher->fetch( $batch_size );
$batch_size = count( $batch );
if ( ! $batch_size ) {
return 0;
}
if ( $this->progress_bar ) {
/* translators: %d: amount of actions */
$this->progress_bar->set_message( sprintf( _n( 'Migrating %d action', 'Migrating %d actions', $batch_size, 'woocommerce' ), $batch_size ) );
$this->progress_bar->set_count( $batch_size );
}
$this->migrate_actions( $batch );
return $batch_size;
}