forked from jaiiali/woocommerce-gateway-idpay
-
Notifications
You must be signed in to change notification settings - Fork 5
/
woo-idpay-gateway.php
executable file
·43 lines (35 loc) · 1.12 KB
/
woo-idpay-gateway.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
<?php
/**
* Plugin Name: IDPay payment gateway for Woocommerce
* Author: IDPay
* Description: <a href="https://idpay.ir">IDPay</a> secure payment gateway for Woocommerce.
* Version: 2.2.5
* Author URI: https://idpay.ir
* Author Email: info@idpay.ir
* Text Domain: woo-idpay-gateway
* Domain Path: /languages/
*
* WC requires at least: 3.0
* WC tested up to: 7.2
*/
if (! defined('ABSPATH')) {
exit;
}
function woo_idpay_gateway_load()
{
$realPath = basename(dirname(__FILE__)) . '/languages';
load_plugin_textdomain('woo-idpay-gateway', false, $realPath);
}
function checkEnabledHPOS()
{
if (class_exists(\Automattic\WooCommerce\Utilities\FeaturesUtil :: class)) {
$featureId = 'custom_order_tables';
$f = __FILE__;
$bool= true;
\Automattic\WooCommerce\Utilities\FeaturesUtil::declare_compatibility($featureId, $f, $bool);
}
}
add_action('before_woocommerce_init', 'checkEnabledHPOS');
add_action('init', 'woo_idpay_gateway_load');
require_once(plugin_dir_path(__FILE__) . 'includes/IdOrder.php');
require_once(plugin_dir_path(__FILE__) . 'includes/wc-gateway-idpay-init.php');