This repository has been archived by the owner on Jan 20, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathgiftable-for-woocommerce.php
executable file
·77 lines (66 loc) · 2.44 KB
/
giftable-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
73
74
75
76
77
<?php
/**
* @wordpress-plugin
* Plugin Name: Giftable for WooCommerce
* Plugin URI: https://decom.ba/wordpress-plugins/giftable-for-woocommerce
* Description: Offer free gifts to your customers based on any number of easy to set up conditions (e.g. total amount and/or number of cart items on checkout).
* Version: 1.0.5
* Author: Decom
* Author URI: https://decom.ba
* License: GPL2
* License URI: https://www.gnu.org/licenses/gpl-2.0.html
* Domain Path: /languages
* Text Domain: giftable-for-woocommerce
*
* Giftable for WooCommerce is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 2 of the License, or
* any later version.
*
* Giftable for WooCommerce is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with Giftable for WooCommerce. If not, see https://www.gnu.org/licenses/gpl-2.0.html.
*/
// If this file is called directly, abort.
if ( ! defined( 'WPINC' ) ) {
die;
}
define('DGFW_DOMAIN', 'giftable-for-woocommerce');
define('DGFW_PLUGIN_FILE', plugin_basename(__FILE__));
/**
* The code that runs during plugin activation.
* This action is documented in includes/Activator.php
*/
function activate_decom_gifts_for_woocommerce() {
require_once plugin_dir_path( __FILE__ ) . 'includes/Activator.php';
DGFW_Activator::activate();
}
/**
* The code that runs during plugin deactivation.
* This action is documented in includes/Deactivator.php
*/
function deactivate_decom_gifts_for_woocommerce() {
require_once plugin_dir_path( __FILE__ ) . 'includes/Deactivator.php';
DGFW_Deactivator::deactivate();
}
register_activation_hook( __FILE__, 'activate_decom_gifts_for_woocommerce' );
register_deactivation_hook( __FILE__, 'deactivate_decom_gifts_for_woocommerce' );
/**
* Begins execution of the plugin.
*
* @since 0.9.0
*/
function run_decom_gifts_for_woocommerce() {
if (is_admin()) {
require plugin_dir_path( __FILE__ ) . 'admin/Admin.php';
$plugin = new DGFW_Admin();
} else {
require plugin_dir_path( __FILE__ ) . 'public/Public.php';
$plugin = new DGFW_Public();
}
}
run_decom_gifts_for_woocommerce();