WC_Data_Store::read_multiple()publicWC 6.9.0

Reads multiple objects from the data store.

Method of the class: WC_Data_Store{}

No Hooks.

Return

null. Nothing (null).

Usage

$WC_Data_Store = new WC_Data_Store();
$WC_Data_Store->read_multiple( $objects );
$objects(array[WC_Data]) (passed by reference — &)
Array of object instances to read.
Default: array()

Changelog

Since 6.9.0 Introduced.

WC_Data_Store::read_multiple() code WC 8.6.1

public function read_multiple( &$objects = array() ) {
	// If the datastore allows for bulk-reading, use it.
	if ( is_callable( array( $this->instance, 'read_multiple' ) ) ) {
		$this->instance->read_multiple( $objects );
	} else {
		foreach ( $objects as &$obj ) {
			$this->read( $obj );
		}
	}
}