ActionScheduler_ListTable::bulk_delete
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(int[]) (обязательный)
- Action IDs.
- $ids_sql(строка) (обязательный)
- Inherited and unused.
Код ActionScheduler_ListTable::bulk_delete() ActionScheduler ListTable::bulk delete WC 10.0.2
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. // phpcs:ignore WordPress.PHP.DevelopmentFunctions.error_log_error_log 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() ) ); } } }