<?php

/**
 * Plugin Name: Digital Apps Payments for Adyen
 * Description: Accept secure Adyen card payments in WooCommerce.
 * Version: 1.0.7
 * Requires at least: 6.5
 * Requires PHP: 7.4
 * Requires Plugins: woocommerce
 * Author: Digital Apps
 * Author URI: https://digitalapps.com
 * Text Domain: digital-apps-payments-for-adyen
 * License: GPL v2 or later
 * License URI: https://www.gnu.org/licenses/gpl-2.0.html
 */

defined('ABSPATH') || exit;

if (!defined('DIGITALAPPS_PAYMENTS_FOR_ADYEN_PATH')) {
	define('DIGITALAPPS_PAYMENTS_FOR_ADYEN_PATH', plugin_dir_path(__FILE__));
}
if (!defined('DIGITALAPPS_PAYMENTS_FOR_ADYEN_URL')) {
	define('DIGITALAPPS_PAYMENTS_FOR_ADYEN_URL', plugin_dir_url(__FILE__));
}
if (!defined('DIGITALAPPS_PAYMENTS_FOR_ADYEN_VERSION')) {
	define('DIGITALAPPS_PAYMENTS_FOR_ADYEN_VERSION', '1.0.7');
}
if (!defined('DIGITALAPPS_PAYMENTS_FOR_ADYEN_API_VERSION')) {
	define('DIGITALAPPS_PAYMENTS_FOR_ADYEN_API_VERSION', '1.1.0');
}

require_once DIGITALAPPS_PAYMENTS_FOR_ADYEN_PATH . 'includes/class-adyen-plugin.php';

use DigitalApps\PaymentsForAdyen\Adyen_Plugin;

function digitalapps_payments_for_adyen_init()
{
	Adyen_Plugin::instance();
}
add_action('plugins_loaded', 'digitalapps_payments_for_adyen_init');

register_activation_hook(__FILE__, ['DigitalApps\\PaymentsForAdyen\\Adyen_Plugin', 'activate']);
register_deactivation_hook(__FILE__, ['DigitalApps\\PaymentsForAdyen\\Adyen_Plugin', 'deactivate']);
register_uninstall_hook(__FILE__, ['DigitalApps\\PaymentsForAdyen\\Adyen_Plugin', 'uninstall']);
