-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy patheasy-referral-for-woocommerce.php
51 lines (47 loc) · 1.4 KB
/
easy-referral-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
<?php
/**
* Plugin Name: Easy Referral for WooCommerce
* Plugin URI: https://wordpress.org/plugins/easy-referral-for-woocommerce
* Description: Easy Referral System for WooCommerce
* Version: 1.0.6-dev
* Author: Thanks to IT
* Author URI: https://github.com/thanks-to-it
* License: GNU General Public License v3.0
* License URI: http://www.gnu.org/licenses/gpl-3.0.html
* Text Domain: easy-referral-for-woocommerce
* Domain Path: /src/languages
* WC requires at least: 3.0.0
* WC tested up to: 4.0
*/
if ( ! defined( 'ABSPATH' ) ) {
exit;
} // Exit if accessed directly
require_once "src/vendor/autoload.php";
// Check if WooCommerce is active
$plugin = 'woocommerce/woocommerce.php';
if (
! in_array( $plugin, apply_filters( 'active_plugins', get_option( 'active_plugins', array() ) ) ) &&
! ( is_multisite() && array_key_exists( $plugin, get_site_option( 'active_sitewide_plugins', array() ) ) )
) {
return;
}
if ( ! function_exists( 'ERWC' ) ) {
/**
* @param string $action
* @param array $skip_intervals
*
* @return \ThanksToIT\ERWC\Core
*/
function ERWC( $action = '', $skip_intervals = array() ) {
return \ThanksToIT\ERWC\Core::get_instance();
}
}
$plugin = ERWC();
$plugin->setup( array(
'version' => '1.0.6-dev',
'filesystem_path' => __FILE__,
'text_domain' => 'easy-referral-for-woocommerce'
) );
if ( true === apply_filters( 'erwc_init', true ) ) {
$plugin->init();
}