-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathload-package.php
38 lines (32 loc) · 932 Bytes
/
load-package.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
<?php
/**
* This file is designed to be used to load as package NOT a WP plugin!
*
* @version 1.0.4
* @package CoCart Rate Limiting
*/
defined( 'ABSPATH' ) || exit;
if ( version_compare( PHP_VERSION, '7.4', '<' ) ) {
return;
}
if ( ! defined( 'COCART_RATE_LIMITING_FILE' ) ) {
define( 'COCART_RATE_LIMITING_FILE', __FILE__ );
}
// Include the main CoCart Rate Limiting class.
if ( ! class_exists( 'CoCart\RateLimiting\Plugin', false ) ) {
include_once untrailingslashit( plugin_dir_path( COCART_RATE_LIMITING_FILE ) ) . '/includes/class-cocart-rate-limiting.php';
}
/**
* Returns the main instance of cocart_rate_limiting and only runs if it does not already exists.
*
* @return cocart_rate_limiting
*/
if ( ! function_exists( 'cocart_rate_limiting' ) ) {
/**
* Initialize CoCart Rate Limiting.
*/
function cocart_rate_limiting() {
return \CoCart\RateLimiting\Plugin::init();
}
cocart_rate_limiting();
}