Alert: This function’s access is marked private. This means it is not intended for use by plugin or theme developers, only in other core functions. It is listed here for completeness.

Inventory_Presser_Addon_Updater::convert_object_to_array( stdClass $data )

Convert some objects to arrays when injecting data into the update API

Description Description

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.

Top ↑

Parameters Parameters


(stdClass) (Required)

Top ↑

Return Return


Top ↑

Source Source

File: includes/addon/class-addon-updater.php

		private function convert_object_to_array( $data ) {
			$new_data = array();
			foreach ( $data as $key => $value ) {
				$new_data[ $key ] = is_object( $value ) ? $this->convert_object_to_array( $value ) : $value;
			return $new_data;

Top ↑

Changelog Changelog

Version Description
3.6.5 Introduced.