Action_Scheduler\Migration
Runner::run()
Run migration batch.
Метод класса: Runner{}
Хуков нет.
Возвращает
int
. Size of batch processed.
Использование
$Runner = new Runner(); $Runner->run( $batch_size );
- $batch_size(int)
- Optional batch size.
По умолчанию: 10
Код Runner::run() Runner::run WC 9.2.3
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; }