<?php
/**
 * WooCommerce 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\Controllers\WooCommerce\WooCommerce_Controller;
use MOWCPS\Common\Interfaces\Hookable_Interface;
use MOWCPS\Common\Suppliers\Amrod as Amrod_Supplier;

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

/**
 * Class WooCommerce
 *
 * Registers WooCommerce hook
 */
class WooCommerce implements Hookable_Interface {
	/**
	 * Initialize the WooCommerce hooks
	 */
	public function __construct() {
		$this->register_hooks();
	}

	/**
	 * Register WooCommerce hooks
	 *
	 * @return void
	 */
	public function register_hooks() {
		add_action( 'manage_posts_extra_tablenav', array( WooCommerce_Controller::class, 'render_bulk_delete_products_button' ), 20, 1 );
		add_action( 'admin_notices', array( WooCommerce_Controller::class, 'display_product_deletion_notice' ) );
		add_filter( 'woocommerce_product_tabs', array( Amrod_Supplier::class, 'register_product_info_tabs' ), 20, 1 );
		add_action( 'wp_enqueue_scripts', array( Amrod_Supplier::class, 'maybe_enqueue_amrod_product_tab_assets' ), 20 );
	}
}
