PluginProbe
Autopay dla WooCommerce / trunk
Autopay dla WooCommerce vtrunk
2.2.30 2.2.29 2.2.28 trunk 1.0.0 1.1.0 1.2.0 1.2.1 1.2.2 1.3.0 1.3.1 1.4.0 1.4.1 1.4.2 1.4.3 1.4.4 1.5.0 2.0.0 2.0.1 2.1.0 2.2.0 2.2.1 2.2.11 2.2.12 2.2.13 All 46 releases
pay-wp / src / Helpers / ArrayFlattener.php

ArrayFlattener.php in Autopay dla WooCommerce trunk, at src/Helpers/ArrayFlattener.php

22 lines 362 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 namespace WPDesk\GatewayWPPay\Helpers;
4
5 class ArrayFlattener {
6
7 public static function flatten_array( array $array ): array {
8 $result = [];
9
10 foreach ( $array as $element ) {
11 if ( is_array( $element ) ) {
12 $result = array_merge( $result, self::flatten_array( $element ) );
13 } else {
14 $result[] = $element;
15 }
16 }
17
18 return $result;
19 }
20
21 }
22