-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathreferral-system-for-woocommerce.php
51 lines (39 loc) · 1.24 KB
/
referral-system-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: Referral System for WooCommerce
* Description: Turn your WooCommerce Coupons into Referral codes.
* Version: 1.0.0
* 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: referral-system-for-woocommerce
* Domain Path: /languages
* WC requires at least: 3.0.0
* WC tested up to: 3.4
*/
if ( ! defined( 'ABSPATH' ) ) {
exit;
} // Exit if accessed directly
require_once "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;
}
$plugin = \ThanksToIT\RSWC\Core::instance();
$plugin->setup( array(
'path' => __FILE__
) );
if ( true === apply_filters( 'trswc_init', true ) ) {
$plugin->init();
}
add_action('wp_loaded',function(){
//$referrer = new \ThanksToIT\RSWC\Referrer();
//error_log($referrer->get_ip());
//$authenticity = new \ThanksToIT\RSWC\Authenticity();
//$authenticity->get_fraud_suspicion_info( 173 );
});