File: /www/sites/timexsaleall.com/index/wp-content/plugins/unioncard/unioncard.php
<?php
/*
Plugin Name: Unioncard payments gateways
Description: An WooCommerce payment toolkit that helps you sell anything .Beautifully
Author: unioncard.PG
Version: v1.0.0
*/
defined('ABSPATH') || exit;
define('UNIONCARD_GATEWAY_VERSION', 'v1');
define('UNIONCARD_PLUGIN_VERSION', 'v1.0.0');
define('UNIONCARD_PLUGIN_URL', untrailingslashit(plugins_url(basename(plugin_dir_path(__FILE__)), basename(__FILE__))));
define('UNIONCARD_PLUGIN_PATH', __DIR__ . '/');
define('UNIONCARD_PLUGIN_NAME', 'unioncard');
function unioncard_init() // @codingStandardsIgnoreLine
{
if (!class_exists('WooCommerce')) {
add_action('admin_notices', function () {
echo '<div class="error"><p><strong>' . __('unioncard requires WooCommerce to be installed and active.', UNIONCARD_PLUGIN_NAME) . '</strong></p></div>';
});
return;
}
require_once UNIONCARD_PLUGIN_PATH . 'includes/main.php';
require_once UNIONCARD_PLUGIN_PATH . 'includes/gateways/gatewayTrait.php';
foreach (glob(UNIONCARD_PLUGIN_PATH . 'includes/*/*.php') as $includeFile) {
require_once $includeFile;
}
$unioncard = Unioncard\Main::getInstance();
$unioncard->init();
add_action('wp_enqueue_scripts', [$unioncard, 'addPluginJs']);
}
add_action('plugins_loaded', 'unioncard_init');