Automattic\WooCommerce\Internal\Admin\Settings
Utils::order_map_normalize
Normalize an order map.
Sort the order map by the order and ensure the order values start from 0 and are consecutive.
Method of the class: Utils{}
No Hooks.
Returns
Array
. The normalized order map.
Usage
$result = Utils::order_map_normalize( $order_map ): array;
- $order_map(array) (required)
- The order map.
Utils::order_map_normalize() Utils::order map normalize code WC 9.8.5
public static function order_map_normalize( array $order_map ): array { asort( $order_map ); return array_flip( array_keys( $order_map ) ); }