<?php
/**
 * Pro Telemetry Data.
 *
 * Extends the base telemetry data with Pro-specific collectors.
 *
 * @package     EDD\Pro\Telemetry
 * @copyright   Copyright (c) 2026, Sandhills Development, LLC
 * @license     https://opensource.org/licenses/gpl-2.0.php GNU Public License
 * @since       3.6.8
 */

namespace EDD\Pro\Telemetry;

// Exit if accessed directly.
defined( 'ABSPATH' ) || exit; // @codeCoverageIgnore

/**
 * Class Data
 *
 * @since 3.6.8
 */
class Data extends \EDD\Telemetry\Data {

	/**
	 * Gets all of the site data including Pro-specific collectors.
	 *
	 * @since 3.6.8
	 *
	 * @return false|array
	 */
	public function get() {
		$data = parent::get();

		$cart_recovery = new CartRecovery();

		$data['cart_recovery'] = $cart_recovery->get();

		$data['stats'] = array_merge(
			$data['stats'] ?? array(),
			$cart_recovery->get_flat_stats()
		);

		return $data;
	}
}
