Automattic\WooCommerce\Internal\Admin\Settings
Utils::order_map_add_at_order()
Add an id to a specific order in an order map.
Метод класса: Utils{}
Хуков нет.
Возвращает
Массив
. The updated order map. If the id is already in the order map, the order map is returned as is.
Использование
$result = Utils::order_map_add_at_order( $order_map, $id, $order ): array;
- $order_map(массив) (обязательный)
- The order map.
- $id(строка) (обязательный)
- The id to move.
- $order(int) (обязательный)
- The order to move the id to.
Код Utils::order_map_add_at_order() Utils::order map add at order WC 9.6.1
public static function order_map_add_at_order( array $order_map, string $id, int $order ): array { // If the id is in the order map, return the order map as is. if ( isset( $order_map[ $id ] ) ) { return $order_map; } return self::order_map_place_at_order( $order_map, $id, $order ); }