-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathfree-gift-for-wc.php
46 lines (38 loc) · 938 Bytes
/
free-gift-for-wc.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
<?php
/**
* Plugin Name: Free Gift For WC
* Description: Add a Free Gift to Cart
* Author: Chris Bibby
* Author URI: https://chrisbibby.com.au
* Text Domain: free-gift-for-wc
* Domain Path: /languages
* Version: 1.1.7
* GitHub Plugin URI: cmbibby/free-gift-for-wc
* WC requires at least: 3.5.0
* WC tested up to: 4.7.0
*
* @package Free_Gift_For_Wc
*/
// Your code starts here.
namespace Free_Gift_WC;
require_once( __DIR__ ) . '/vendor/autoload.php';
class Loader {
protected static $dir_path = '';
protected static $plugin_version = '1.1.4';
public function __construct() {
self::$dir_path = plugin_dir_url( __FILE__ );
new Plugin;
}
public static function get_dir_url() {
return self::$dir_path;
}
public static function get_plugin_version() {
return self::$plugin_version;
}
}
add_action(
'plugins_loaded',
function() {
new Loader;
}
);