Automattic\WooCommerce\Internal\EmailEditor\WCTransactionalEmails

WCEmailTemplateChangeSummary::reject_indicesprivate staticWC 1.0

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.

Method of the class: WCEmailTemplateChangeSummary{}

No Hooks.

Returns

Array. array<string, mixed>>

Usage

$result = WCEmailTemplateChangeSummary::reject_indices( $entries, $drop ): array;
$entries(array) (required)
.
$drop(array) (required)
.

WCEmailTemplateChangeSummary::reject_indices() code WC 10.9.1

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;
}