<?php
/**
 * This file deals with creating instances for functionalities at different init point depending on the plugin plan.
 *
 * @package    WooCommerce_Product_Sync
 * @subpackage WooCommerce_Product_Sync/includes
 * @author     miniOrange <info@miniorange.com>
 * @link       https://miniorange.com
 */

namespace MOWCPS\Common\Loader;

use MOWCPS\Common\Hooks\Admin_Menu;
use MOWCPS\Common\Hooks\Plugin_Load;
use MOWCPS\Common\Hooks\Rest_API;
use MOWCPS\Common\Hooks\WooCommerce;

/**
 * Loader class
 */
class Loader {

	/**
	 * Class default constructor.
	 *
	 * Registers the init_hooks method to run on WordPress 'plugins_loaded' action.
	 */
	public function __construct() {
		new Plugin_Load();
		new Admin_Menu();
		new WooCommerce();
		new Rest_API();
		add_action( 'plugins_loaded', array( $this, 'init_hooks' ) );
	}

	/**
	 * Initialize all plugin hooks in the correct sequence.
	 *
	 * @return void
	 */
	public function init_hooks() {
		new \MOWCPS\Common\Hooks\Init_Hooks();
	}
}

new Loader();
