public/wordpress/wp-content/plugins/wp-courseware/includes/core/updater.php
/**
	 * Convert some objects to arrays when injecting data into the update API
	 *
	 * Some data like sections, banners, and icons are expected to be an associative array, however due to the JSON
	 * decoding, they are objects. This method allows us to pass in the object and return an associative array.
	 *
	 * @since 1.6.17
	 *
	 * @param stdClass $data
	 *
	 * @return array
	 */
Convert some objects to arrays when injecting data into the update API
Some data like sections, banners, and icons are expected to be an associative array, however due to the JSON
decoding, they are objects. This method allows us to pass in the object and return an associative array.



@param stdClass $data

@return array
Convert some objects to arrays when injecting data into the update API Some data like sections banners and icons are expected to be an associative array however due to the JSON decoding they are objects . This method allows us to pass in the object and return an associative array . @param stdClass $data @return array
private function convert_object_to_array( $data ) {
		$new_data = array();
		foreach ( $data as $key => $value ) {
			$new_data[ $key ] = $value;
		}
		return $new_data;
	}
private function convert_object_to_array ( $ data ) { $ new_data = array ( ) ; foreach ( $ data as $ key => $ value ) { $ new_data [ $ key ] = $ value ; } return $ new_data ; }
Convert some objects to arrays when injecting data into the update API
 Some data like sections, banners, and icons are expected to be an associative array, however due to the JSON
 decoding, they are objects.
Convert some objects to arrays when injecting data into the update API Some data like sections banners and icons are expected to be an associative array however due to the JSON decoding they are objects .