Automattic\WooCommerce\Internal\CLI\Migrator\Lib
ImportSession::count_imported_entities
Gets the current progress information.
Метод класса: ImportSession{}
Хуков нет.
Возвращает
array. The progress data
Использование
$ImportSession = new ImportSession(); $ImportSession->count_imported_entities();
Код ImportSession::count_imported_entities() ImportSession::count imported entities WC 11.1.0
public function count_imported_entities() {
$progress = array();
foreach ( self::PROGRESS_ENTITIES as $entity ) {
$progress[] = array(
'label' => $entity,
'imported' => (int) get_post_meta( $this->post_id, 'imported_' . $entity, true ),
'total' => (int) get_post_meta( $this->post_id, 'total_' . $entity, true ),
);
}
return $progress;
}