-
-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathwc-quick-buy.php
60 lines (53 loc) · 1.78 KB
/
wc-quick-buy.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
<?php
/**
* Plugin Name: Quick Buy For WooCommerce
* Plugin URI: https://wordpress.org/plugins/woocommerce-quick-buy/
* Description: Add Quick buy button to redirect user to checkout / cart immediately when he click quick buy button
* Version: 2.8.4
* Author: Varun Sridharan
* Author URI: http://varunsridharan.in
* Text Domain: wc-quick-buy
* License: GPL-3.0+
* License URI: http://www.gnu.org/licenses/gpl-3.0.txt
* GitHub Plugin URI: https://github.com/varunsridharan/woocommerce-quick-buy
* Domain Path: /i18n
* WC requires at least: 3.0
* WC tested up to: 6.2.0
*/
defined( 'ABSPATH' ) || exit;
defined( 'WCQB_FILE' ) || define( 'WCQB_FILE', __FILE__ );
defined( 'WCQB_VERSION' ) || define( 'WCQB_VERSION', '2.8.4' );
defined( 'WCQB_NAME' ) || define( 'WCQB_NAME', __( 'Quick Buy For WooCommerce', 'wc-quick-buy' ) );
if ( file_exists( __DIR__ . '/vendor/autoload.php' ) ) {
require_once __DIR__ . '/vendor/autoload.php';
}
if ( function_exists( 'vsp_maybe_load' ) ) {
vsp_maybe_load( 'wc_quick_buy_init', __DIR__ . '/vendor/varunsridharan' );
}
if ( function_exists( 'wponion_load' ) ) {
wponion_load( __DIR__ . '/vendor/wponion/wponion' );
}
if ( ! function_exists( 'wc_quick_buy_init' ) ) {
/**
* Inits WC Quick Buy Plugin Once VSP Framework is Loaded.
*
* @return bool|\WC_Quick_Buy
*/
function wc_quick_buy_init() {
if ( ! vsp_add_wc_required_notice( WCQB_NAME ) && ( ! vsp_is_ajax() || ! vsp_is_cron() ) ) {
require_once __DIR__ . '/bootstrap.php';
return wc_quick_buy();
}
return false;
}
}
if ( ! function_exists( 'wc_quikc_buy' ) ) {
/**
* Returns Quick Buy Plugins Instance.
*
* @return bool|\WC_Quick_Buy
*/
function wc_quick_buy() {
return WC_Quick_Buy::instance();
}
}