ActionScheduler_ListTable::bulk_delete()protectedWC 1.0

Bulk delete

Deletes actions based on their ID. This is the handler for the bulk delete. It assumes the data properly validated by the callee and it will delete the actions without any extra validation.

Метод класса: ActionScheduler_ListTable{}

Хуков нет.

Возвращает

null. Ничего (null).

Использование

// protected - в коде основоного (родительского) или дочернего класса
$result = $this->bulk_delete( $ids, $ids_sql );
$ids(массив) (обязательный)
-
$ids_sql(строка) (обязательный)
Inherited and unused

Код ActionScheduler_ListTable::bulk_delete() WC 8.7.0

protected function bulk_delete( array $ids, $ids_sql ) {
	foreach ( $ids as $id ) {
		try {
			$this->store->delete_action( $id );
		} catch ( Exception $e ) {
			// A possible reason for an exception would include a scenario where the same action is deleted by a
			// concurrent request.
			error_log(
				sprintf(
					/* translators: 1: action ID 2: exception message. */
					__( 'Action Scheduler was unable to delete action %1$d. Reason: %2$s', 'woocommerce' ),
					$id,
					$e->getMessage()
				)
			);
		}
	}
}