forked from cferdinandi/gmt-pricing-parity
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgmt-pricing-parity.php
More file actions
51 lines (38 loc) · 1.46 KB
/
Copy pathgmt-pricing-parity.php
File metadata and controls
51 lines (38 loc) · 1.46 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
<?php
/**
* Plugin Name: GMT Pricing Parity
* Plugin URI: https://github.com/cferdinandi/gmt-pricing-parity/
* GitHub Plugin URI: https://github.com/cferdinandi/gmt-pricing-parity/
* Description: Provide custom discounts based on geographic location
* Version: 2.3.4
* Author: Chris Ferdinandi
* Author URI: http://gomakethings.com
* License: GPLv3
*/
// Define constants
define( 'GMT_PRICING_PARITY_VERSION', '2.3.4' );
// Utilities
require_once( plugin_dir_path( __FILE__ ) . 'includes/helpers.php' );
// Shortcode
require_once( plugin_dir_path( __FILE__ ) . 'includes/shortcode.php' );
// API
require_once( plugin_dir_path( __FILE__ ) . 'includes/api.php' );
// Checkout
require_once( plugin_dir_path( __FILE__ ) . 'includes/checkout.php' );
// Payments
require_once( plugin_dir_path( __FILE__ ) . 'includes/payments.php' );
// Custom Post Type
require_once( plugin_dir_path( __FILE__ ) . 'includes/cpt.php' );
require_once( plugin_dir_path( __FILE__ ) . 'includes/metabox.php' );
/**
* Check the plugin version and make updates if needed
*/
function gmt_pricing_parity_check_version() {
// Get plugin data
$old_version = get_site_option( 'gmt_pricing_parity_version' );
// Update plugin to current version number
if ( empty( $old_version ) || version_compare( $old_version, GMT_PRICING_PARITY_VERSION, '<' ) ) {
update_site_option( 'gmt_pricing_parity_version', GMT_PRICING_PARITY_VERSION );
}
}
add_action( 'plugins_loaded', 'gmt_pricing_parity_check_version' );