-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcartick.php
executable file
·83 lines (70 loc) · 1.95 KB
/
cartick.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
78
79
80
81
82
83
<?php
/**
* Plugin Name: Cartick - Advanced Cart for WooCommerce
* Plugin URI: https://wpaxiom.com/cartick
* Description: Cartick is a powerful WordPress plugin designed exclusively for WooCommerce, enhancing your online store's user experience with a range of innovative cart features.
* Version: 1.0.2
* Author: WPaxiom
* Author URI: https://wpaxiom.com
* License: GPL-2.0+
* License URI: http://www.gnu.org/licenses/gpl-2.0.txt
* Text Domain: cartick
* Domain Path: /languages
*
* Requires PHP: 7.4
* Requires at least: 5.8
* Tested up to: 6.4
* WC requires at least: 6.3
* WC tested up to: 8.5
*
* @package cartick
* @author WpAxiom <[email protected]>
* @version 1.0.2
* @since 1.0.0
*/
if ( ! defined( 'ABSPATH' ) ) exit;
if ( ! defined( 'CARTICK_VERSION' ) ) {
define( 'CARTICK_VERSION', '1.0.2' );
}
if ( ! defined( 'CARTICK_FILE' ) ) {
define( 'CARTICK_FILE', __FILE__ );
}
if ( ! defined( 'CARTICK_PATH' ) ) {
define( 'CARTICK_PATH', plugin_dir_path( CARTICK_FILE ) );
}
if ( ! defined( 'CARTICK_URL' ) ) {
define( 'CARTICK_URL', plugins_url( 'cartick' ) );
}
if ( ! defined( 'CARTICK_ASSETS' ) ) {
define( 'CARTICK_ASSETS', CARTICK_URL . '/assets' );
}
/**
* Cartick helper
*/
include 'cartick-helper.php';
/**
* Composer autoload
*/
if ( file_exists( CARTICK_PATH . '/vendor/autoload.php' ) ) {
require_once CARTICK_PATH . '/vendor/autoload.php';
/**
* Plugin Initializer.
*/
function cartick() {
return WpAxiom\Cartick\Cartick::init();
}
// Initialize.
cartick();
} else {
add_action(
'admin_notices',
function () {
?>
<div class="notice notice-error notice-alt">
<p><?php esc_html_e( 'Cannot initialize “Cartick” plugin. <code>vendor/autoload.php</code> is missing. Please run <code>composer dump-autoload -o</code> within the this plugin directory.', 'cartick' ); ?></p>
</div>
<?php
}
);
}
// End of file cartick.php.