woocommerce-role-based-price.php
2.26 KB
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
<?php
/**
* Plugin Name: Role Based Price For WooCommerce
* Plugin URI: https://wordpress.org/plugins/woocommerce-role-based-price/
* Description: Sell product in different price for different user role based on your settings.
* Version: 3.3.6
* Author: Varun Sridharan
* Author URI: http://varunsridharan.in
* License: GPL-2.0+
* License URI: http://www.gnu.org/licenses/gpl-2.0.txt
* Text Domain: woocommerce-role-based-price
* Domain Path: /languages/
*/
if ( ! defined( 'WPINC' ) ) {
die;
}
define( 'WC_RBP_FILE', plugin_basename( __FILE__ ) );
define( 'WC_RBP_PATH', plugin_dir_path( __FILE__ ) ); # Plugin DIR
define( 'WC_RBP_INC', WC_RBP_PATH . 'includes/' ); # Plugin INC Folder
define( 'WC_RBP_DEPEN', 'woocommerce/woocommerce.php' );
define( 'WC_RBP_VARIABLE_VERSION', '3.3.6' );
register_activation_hook( __FILE__, 'wc_rbp_activate_plugin_name' );
register_deactivation_hook( __FILE__, 'wc_rbp_deactivate_plugin_name' );
register_deactivation_hook( WC_RBP_DEPEN, 'wc_rbp_dependency_plugin_deactivate' );
/**
* The code that runs during plugin activation.
* This action is documented in includes/class-plugin-name-activator.php
*/
function wc_rbp_activate_plugin_name() {
require_once( WC_RBP_INC . 'helpers/class-activator.php' );
woocommerce_role_based_price_Activator::activate();
}
/**
* The code that runs during plugin deactivation.
* This action is documented in includes/class-plugin-name-deactivator.php
*/
function wc_rbp_deactivate_plugin_name() {
require_once( WC_RBP_INC . 'helpers/class-deactivator.php' );
woocommerce_role_based_price_Deactivator::deactivate();
}
/**
* The code that runs during plugin deactivation.
* This action is documented in includes/class-plugin-name-deactivator.php
*/
function wc_rbp_dependency_plugin_deactivate() {
require_once( WC_RBP_INC . 'helpers/class-deactivator.php' );
woocommerce_role_based_price_Deactivator::dependency_deactivate();
}
require_once( WC_RBP_INC . 'functions.php' );
require_once( plugin_dir_path( __FILE__ ) . 'bootstrap.php' );
if ( ! function_exists( 'woocommerce_role_based_price' ) ) {
function woocommerce_role_based_price() {
return woocommerce_role_based_price::get_instance();
}
}
woocommerce_role_based_price();