Automattic\WooCommerce\Internal\EmailEditor\WCTransactionalEmails
WCEmailTemplateChangeSummary::reject_indices
Drop entries at the given indices and return a re-indexed list. Used by the reorder pass to remove paired entries from added/removed without losing the rich shape of the survivors.
Метод класса: WCEmailTemplateChangeSummary{}
Хуков нет.
Возвращает
array<int,. array<string, mixed>>
Использование
$result = WCEmailTemplateChangeSummary::reject_indices( $entries, $drop ): array;
- $entries(массив) (обязательный)
- .
- $drop(array<int, true>) (обязательный)
- Indices to drop.
Код WCEmailTemplateChangeSummary::reject_indices() WCEmailTemplateChangeSummary::reject indices WC 11.2.2
private static function reject_indices( array $entries, array $drop ): array {
$out = array();
foreach ( $entries as $i => $entry ) {
if ( ! isset( $drop[ $i ] ) ) {
$out[] = $entry;
}
}
return $out;
}