<?php
/**
 * Ingram_Micro Filter Hook
 *
 * @category   WordPress_Plugin
 * @package    Common
 * @subpackage Hooks
 * @author     miniOrange <info@miniorange.com>
 * @license    MIT/Expat
 * @link       https://plugins.miniorange.com/woocommerce-api-product-sync-with-woocommerce-rest-apis
 */

namespace MOWCPS\Common\Hooks;

use MOWCPS\Common\Constants\Plugin_Filters;
use MOWCPS\Common\Interfaces\Hookable_Interface;
use MOWCPS\Common\Suppliers\Ingram_Micro as Ingram_Micro_Supplier;

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

/**
 * Class Ingram_Micro
 *
 * Handles Ingram_Micro filter hook registration
 */
class Ingram_Micro implements Hookable_Interface {

	/**
	 * Initialize the Ingram_Micro filter hooks.
	 */
	public function __construct() {
		$this->register_hooks();
	}

	/**
	 * Register WordPress hooks.
	 *
	 * @return void
	 */
	public function register_hooks() {
		add_filter( Plugin_Filters::FILTER_ALTER_SUPPLIER_PAYLOAD, array( Ingram_Micro_Supplier::class, 'alter_request_payload' ), 10, 1 );
		add_filter( Plugin_Filters::FILTER_ALTER_SUPPLIER_DATA, array( Ingram_Micro_Supplier::class, 'alter_supplier_data' ), 10, 1 );
	}
}
