gdarko/wp-batch-processing

Add get_data to WP_Batch_Item to retrieve all item custom data at once

Closed this issue · 1 comments

Please add get_data like you did get_value to fetch all data at once:

/**
	 * Return data
	 *
	 * @param $key
	 * @param null $default
	 *
	 * @return mixed|null
	 */
	public function get_data($default = null) {
		return isset($this->data) ? $this->data : $default;
	}

The data can be accessed using $item->data, the data property is public for simplicity sake.