-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy patheu-vat-for-woocommerce.php
72 lines (64 loc) · 1.79 KB
/
eu-vat-for-woocommerce.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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
<?php
/*
Plugin Name: EU/UK VAT Validation Manager for WooCommerce
Plugin URI: https://wpfactory.com/item/eu-vat-for-woocommerce/
Description: Manage EU VAT in WooCommerce. Beautifully.
Version: 4.3.2
Author: WPFactory
Author URI: https://wpfactory.com/
Text Domain: eu-vat-for-woocommerce
Domain Path: /langs
WC tested up to: 9.6
Requires Plugins: woocommerce
License: GNU General Public License v3.0
License URI: http://www.gnu.org/licenses/gpl-3.0.html
*/
defined( 'ABSPATH' ) || exit;
if ( 'eu-vat-for-woocommerce.php' === basename( __FILE__ ) ) {
/**
* Check if Pro plugin version is activated.
*
* @version 4.2.2
* @since 3.2.0
*/
$plugin = 'eu-vat-for-woocommerce-pro/eu-vat-for-woocommerce-pro.php';
if (
in_array( $plugin, (array) get_option( 'active_plugins', array() ), true ) ||
(
is_multisite() &&
array_key_exists( $plugin, (array) get_site_option( 'active_sitewide_plugins', array() ) )
)
) {
defined( 'ALG_WC_EU_VAT_FILE_FREE' ) || define( 'ALG_WC_EU_VAT_FILE_FREE', __FILE__ );
return;
}
}
defined( 'ALG_WC_EU_VAT_VERSION' ) || define( 'ALG_WC_EU_VAT_VERSION', '4.3.2' );
defined( 'ALG_WC_EU_VAT_FILE' ) || define( 'ALG_WC_EU_VAT_FILE', __FILE__ );
require_once plugin_dir_path( __FILE__ ) . 'includes/class-alg-wc-eu-vat.php';
if ( ! function_exists( 'alg_wc_eu_vat' ) ) {
/**
* Returns the main instance of Alg_WC_EU_VAT to prevent the need to use globals.
*
* @version 1.0.0
* @since 1.0.0
*
* @return Alg_WC_EU_VAT
*/
function alg_wc_eu_vat() {
return Alg_WC_EU_VAT::instance();
}
}
/**
* plugins_loaded.
*
* @version 3.1.1
*/
add_action( 'plugins_loaded', 'alg_wc_eu_vat' );
/**
* Load block.
*
* @version 4.0.0
* @since 3.1.5
*/
require_once plugin_dir_path( __FILE__ ) . 'includes/blocks/eu-vat-for-woocommerce-blocks-initialize.php';