<?php
/**
 * Orders Hooks – wires AJAX actions to Orders controller endpoints.
 *
 * @package    MOMCS_Sync
 * @subpackage MOMCS_Sync/includes/common/hooks
 */

declare(strict_types=1);

namespace MOMCS_Sync\Includes\Common\Hooks;

use MOMCS_Sync\Includes\Common\Controllers\Orders_Controller;

if ( ! defined( 'ABSPATH' ) ) {
	exit;
}

/**
 * Class Orders_Hooks
 */
class Orders_Hooks {
	/**
	 * Constructor.
	 */
	public function __construct() {
		$this->register_hooks();
	}

	/**
	 * Register AJAX hooks for orders feature.
	 */
	private function register_hooks(): void {
		add_action( 'wp_ajax_momcs_fetch_orders', array( Orders_Controller::class, 'handle_fetch_orders' ) );
	}
}
