WordPress at Your Fingertips
function is not described

WC_Data_Store_WP::read_meta() public WC 3.0.0

Returns an array of meta for an object.

{} It's a method of the class: WC_Data_Store_WP{}

No Hooks.

Return

Array.

Usage

$WC_Data_Store_WP = new WC_Data_Store_WP();
$WC_Data_Store_WP->read_meta( $object );
$object(WC_Data) (required) (passed by reference — &)
WC_Data object.

Changelog

Since 3.0.0 Introduced.

Code of WC_Data_Store_WP::read_meta() WC 5.6.0

public function read_meta( &$object ) {
	global $wpdb;
	$db_info       = $this->get_db_info();
	$raw_meta_data = $wpdb->get_results(
		$wpdb->prepare(
			// phpcs:disable WordPress.DB.PreparedSQL.InterpolatedNotPrepared
			"SELECT {$db_info['meta_id_field']} as meta_id, meta_key, meta_value
			FROM {$db_info['table']}
			WHERE {$db_info['object_id_field']} = %d
			ORDER BY {$db_info['meta_id_field']}",
			// phpcs:enable
			$object->get_id()
		)
	);
	return $this->filter_raw_meta_data( $object, $raw_meta_data );
}