-
Notifications
You must be signed in to change notification settings - Fork 10
/
art-woo-order-one-click.php
77 lines (68 loc) · 2.45 KB
/
art-woo-order-one-click.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
/**
* Plugin Name: Art WooCommerce Order One Click
* Plugin URI: wpruse.ru/my-plugins/order-one-click/
* Text Domain: art-woocommerce-order-one-click
* Domain Path: /languages
* Description: Plugin for WooCommerce. It includes the catalog mode in the store (there are no prices and the Buy button) and can turn on the Buy/Order button in one click. WooCommerce and Contact Form 7 are required for proper operation.
* Version: 2.4.3
* Author: Artem Abramovich
* Author URI: https://wpruse.ru/
* License: GPL-2.0+
* License URI: http://www.gnu.org/licenses/gpl-2.0.txt
*
* WC requires at least: 3.3.0
* WC tested up to: 5.0
*
* Copyright Artem Abramovich
*
* This file is part of Art WooCommerce Order One Click,
* a plugin for WordPress.
*
* Art WooCommerce Order One Click 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 3 of the License, or (at your option)
* any later version.
*
* Art WooCommerce Order One Click 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 WordPress. If not, see <http://www.gnu.org/licenses/>.
*/
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
$plugin_data = get_file_data(
__FILE__,
array(
'ver' => 'Version',
'name' => 'Plugin Name',
)
);
define( 'AWOOC_PLUGIN_DIR', __DIR__ );
define( 'AWOOC_PLUGIN_URI', plugin_dir_url( __FILE__ ) );
define( 'AWOOC_PLUGIN_FILE', plugin_basename( __FILE__ ) );
define( 'AWOOC_PLUGIN_VER', $plugin_data['ver'] );
define( 'AWOOC_PLUGIN_NAME', $plugin_data['name'] );
require __DIR__ . '/includes/class-awooc.php';
register_uninstall_hook( __FILE__, array( 'AWOOC', 'uninstall' ) );
if ( ! function_exists( 'awooc_order_one_click' ) ) {
/**
* The main function responsible for returning the AWOOC object.
*
* Use this function like you would a global variable, except without needing to declare the global.
*
* Example: <?php awooc_order_one_click()->method_name(); ?>
*
* @return object AWOOC class object.
* @since 1.0.0
*/
function awooc_order_one_click() {
return AWOOC::instance();
}
}
$GLOBALS['awooc'] = awooc_order_one_click();