Version Description
- Fix: WooCommerce compatibility
Download this release
Release Info
Developer | quadlayers |
Plugin | WooCommerce Direct Checkout |
Version | 2.6.9 |
Comparing to | |
See all releases |
Code changes from version 2.6.8 to 2.6.9
- includes/controller/general.php +138 -148
- readme.txt +4 -1
- woocommerce-direct-checkout.php +2 -2
includes/controller/general.php
CHANGED
@@ -1,153 +1,143 @@
|
|
1 |
<?php
|
2 |
|
3 |
-
class QLWCDC_Controller_General
|
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 |
-
|
84 |
-
|
85 |
-
|
86 |
-
|
87 |
-
|
88 |
-
|
89 |
-
|
90 |
-
|
91 |
-
|
92 |
-
|
93 |
-
|
94 |
-
|
95 |
-
|
96 |
-
|
97 |
-
|
98 |
-
|
99 |
-
|
100 |
-
|
101 |
-
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
-
|
106 |
-
|
107 |
-
|
108 |
-
|
109 |
-
|
110 |
-
|
111 |
-
|
112 |
-
|
113 |
-
|
114 |
-
|
115 |
-
|
116 |
-
|
117 |
-
|
118 |
-
|
119 |
-
|
120 |
-
|
121 |
-
|
122 |
-
|
123 |
-
|
124 |
-
|
125 |
-
|
126 |
-
|
127 |
-
|
128 |
-
|
129 |
-
|
130 |
-
|
131 |
-
|
132 |
-
|
133 |
-
|
134 |
-
|
135 |
-
|
136 |
-
|
137 |
-
|
138 |
-
|
139 |
-
|
140 |
-
|
141 |
-
function save_settings()
|
142 |
-
{
|
143 |
-
|
144 |
-
global $current_section;
|
145 |
-
|
146 |
-
if ('' == $current_section) {
|
147 |
-
|
148 |
-
woocommerce_update_options($this->get_settings());
|
149 |
-
}
|
150 |
-
}
|
151 |
}
|
152 |
|
153 |
QLWCDC_Controller_General::instance();
|
1 |
<?php
|
2 |
|
3 |
+
class QLWCDC_Controller_General {
|
4 |
+
|
5 |
+
|
6 |
+
protected static $instance;
|
7 |
+
|
8 |
+
public function __construct() {
|
9 |
+
include_once QLWCDC_PLUGIN_DIR . '/includes/view/frontend/general.php';
|
10 |
+
|
11 |
+
add_action( 'qlwcdc_sections_header', array( $this, 'add_header' ) );
|
12 |
+
add_action( 'woocommerce_sections_' . QLWCDC_PREFIX, array( $this, 'add_section' ), 99 );
|
13 |
+
add_action( 'woocommerce_settings_save_' . QLWCDC_PREFIX, array( $this, 'save_settings' ) );
|
14 |
+
}
|
15 |
+
|
16 |
+
public static function instance() {
|
17 |
+
if ( ! isset( self::$instance ) ) {
|
18 |
+
self::$instance = new self();
|
19 |
+
}
|
20 |
+
return self::$instance;
|
21 |
+
}
|
22 |
+
|
23 |
+
function add_header() {
|
24 |
+
global $current_section;
|
25 |
+
?>
|
26 |
+
<li><a href="<?php echo admin_url( 'admin.php?page=wc-settings&tab=' . QLWCDC_PREFIX . '§ion' ); ?>" class="<?php echo ( $current_section == '' ? 'current' : '' ); ?>"><?php esc_html_e( 'General', 'woocommerce-direct-checkout' ); ?></a> | </li>
|
27 |
+
<?php
|
28 |
+
}
|
29 |
+
|
30 |
+
function get_settings() {
|
31 |
+
return array(
|
32 |
+
array(
|
33 |
+
'name' => esc_html__( 'General', 'woocommerce-direct-checkout' ),
|
34 |
+
'type' => 'title',
|
35 |
+
'desc' => esc_html__( 'Simplifies the checkout process.', 'woocommerce-direct-checkout' ),
|
36 |
+
'id' => 'qlwcdc_section_title',
|
37 |
+
),
|
38 |
+
array(
|
39 |
+
'name' => esc_html__( 'Added to cart alert', 'woocommerce-direct-checkout' ),
|
40 |
+
'desc_tip' => esc_html__( 'Replace "View Cart" alert with direct checkout.', 'woocommerce-direct-checkout' ),
|
41 |
+
'id' => 'qlwcdc_add_to_cart_message',
|
42 |
+
'type' => 'select',
|
43 |
+
'class' => 'chosen_select',
|
44 |
+
'options' => array(
|
45 |
+
'yes' => esc_html__( 'Yes', 'woocommerce-direct-checkout' ),
|
46 |
+
'no' => esc_html__( 'No', 'woocommerce-direct-checkout' ),
|
47 |
+
),
|
48 |
+
'default' => 'no',
|
49 |
+
),
|
50 |
+
array(
|
51 |
+
'name' => esc_html__( 'Added to cart link in shop', 'woocommerce-direct-checkout' ),
|
52 |
+
'desc_tip' => esc_html__( 'Replace "View Cart" link with "Checkout" link in the shop page.', 'woocommerce-direct-checkout' ),
|
53 |
+
'id' => 'qlwcdc_add_to_cart_link',
|
54 |
+
'type' => 'select',
|
55 |
+
'class' => 'chosen_select',
|
56 |
+
'options' => array(
|
57 |
+
'yes' => esc_html__( 'Yes', 'woocommerce-direct-checkout' ),
|
58 |
+
'no' => esc_html__( 'No', 'woocommerce-direct-checkout' ),
|
59 |
+
),
|
60 |
+
'default' => 'no',
|
61 |
+
),
|
62 |
+
array(
|
63 |
+
'name' => esc_html__( 'Added to cart redirect', 'woocommerce-direct-checkout' ),
|
64 |
+
'desc_tip' => esc_html__( 'Add to cart button behaviour.', 'woocommerce-direct-checkout' ),
|
65 |
+
'id' => 'qlwcdc_add_to_cart',
|
66 |
+
'type' => 'select',
|
67 |
+
'class' => 'chosen_select',
|
68 |
+
'options' => array(
|
69 |
+
'no' => esc_html__( 'No', 'woocommerce-direct-checkout' ),
|
70 |
+
// 'ajax' => esc_html__('Ajax', 'woocommerce-direct-checkout'),
|
71 |
+
'redirect' => esc_html__( 'Yes', 'woocommerce-direct-checkout' ),
|
72 |
+
),
|
73 |
+
'default' => 'no',
|
74 |
+
),
|
75 |
+
array(
|
76 |
+
'name' => esc_html__( 'Added to cart redirect to', 'woocommerce-direct-checkout' ),
|
77 |
+
'desc_tip' => esc_html__( 'Redirect to the cart or checkout page after successful addition.', 'woocommerce-direct-checkout' ),
|
78 |
+
'id' => 'qlwcdc_add_to_cart_redirect_page',
|
79 |
+
'type' => 'select',
|
80 |
+
'class' => 'chosen_select',
|
81 |
+
'options' => array(
|
82 |
+
'cart' => esc_html__( 'Cart', 'woocommerce-direct-checkout' ),
|
83 |
+
'checkout' => esc_html__( 'Checkout', 'woocommerce-direct-checkout' ),
|
84 |
+
'url' => esc_html__( 'Custom URL', 'woocommerce-direct-checkout' ),
|
85 |
+
),
|
86 |
+
'default' => 'cart',
|
87 |
+
),
|
88 |
+
array(
|
89 |
+
'name' => esc_html__( 'Added to cart redirect to custom url', 'woocommerce-direct-checkout' ),
|
90 |
+
'desc_tip' => esc_html__( 'Redirect to the cart or checkout page after successful addition.', 'woocommerce-direct-checkout' ),
|
91 |
+
'id' => 'qlwcdc_add_to_cart_redirect_url',
|
92 |
+
'type' => 'text',
|
93 |
+
'placeholder' => wc_get_checkout_url(),
|
94 |
+
),
|
95 |
+
array(
|
96 |
+
'name' => esc_html__( 'Replace cart url', 'woocommerce-direct-checkout' ),
|
97 |
+
'desc_tip' => esc_html__( 'Replace cart url', 'woocommerce-direct-checkout' ),
|
98 |
+
'id' => 'qlwcdc_replace_cart_url',
|
99 |
+
'type' => 'select',
|
100 |
+
'class' => 'chosen_select',
|
101 |
+
'options' => array(
|
102 |
+
'no' => esc_html__( 'No', 'woocommerce-direct-checkout' ),
|
103 |
+
'checkout' => esc_html__( 'Checkout', 'woocommerce-direct-checkout' ),
|
104 |
+
'custom' => esc_html__( 'Custom URL', 'woocommerce-direct-checkout' ),
|
105 |
+
),
|
106 |
+
'default' => 'no',
|
107 |
+
),
|
108 |
+
array(
|
109 |
+
'name' => esc_html__( 'Replace cart url with custom url', 'woocommerce-direct-checkout' ),
|
110 |
+
'desc_tip' => esc_html__( 'Replace cart url with custom url', 'woocommerce-direct-checkout' ),
|
111 |
+
'id' => 'qlwcdc_replace_cart_url_custom',
|
112 |
+
'type' => 'text',
|
113 |
+
'placeholder' => wc_get_checkout_url(),
|
114 |
+
),
|
115 |
+
array(
|
116 |
+
'type' => 'sectionend',
|
117 |
+
'id' => 'qlwcdc_section_end',
|
118 |
+
),
|
119 |
+
);
|
120 |
+
}
|
121 |
+
|
122 |
+
function add_section() {
|
123 |
+
global $current_section;
|
124 |
+
|
125 |
+
if ( '' == $current_section ) {
|
126 |
+
|
127 |
+
$settings = $this->get_settings();
|
128 |
+
|
129 |
+
include_once QLWCDC_PLUGIN_DIR . 'includes/view/backend/pages/general.php';
|
130 |
+
}
|
131 |
+
}
|
132 |
+
|
133 |
+
function save_settings() {
|
134 |
+
global $current_section;
|
135 |
+
|
136 |
+
if ( '' == $current_section ) {
|
137 |
+
|
138 |
+
woocommerce_update_options( $this->get_settings() );
|
139 |
+
}
|
140 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
141 |
}
|
142 |
|
143 |
QLWCDC_Controller_General::instance();
|
readme.txt
CHANGED
@@ -4,7 +4,7 @@ Donate link: https://quadlayers.com/portfolio/woocommerce-direct-checkout/
|
|
4 |
Tags: woocommerce, woocommerce ajax, woocommerce ajax cart, add to cart, woocommerce direct checkout, woocommerce quick buy, woocommerce remove checkout fields, woocommerce ajax single products, woocommerce one page checkout
|
5 |
Requires at least: 4.6
|
6 |
Tested up to: 6.0
|
7 |
-
Stable tag: 2.6.
|
8 |
WC requires at least: 3.1.0
|
9 |
WC tested up to: 6.9
|
10 |
License: GPLv3
|
@@ -64,6 +64,9 @@ The premium version of WooCommerce Direct Checkot allows to include a quick purc
|
|
64 |
|
65 |
== Changelog ==
|
66 |
|
|
|
|
|
|
|
67 |
= 2.6.8 =
|
68 |
* Fix: WooCommerce compatibility
|
69 |
|
4 |
Tags: woocommerce, woocommerce ajax, woocommerce ajax cart, add to cart, woocommerce direct checkout, woocommerce quick buy, woocommerce remove checkout fields, woocommerce ajax single products, woocommerce one page checkout
|
5 |
Requires at least: 4.6
|
6 |
Tested up to: 6.0
|
7 |
+
Stable tag: 2.6.9
|
8 |
WC requires at least: 3.1.0
|
9 |
WC tested up to: 6.9
|
10 |
License: GPLv3
|
64 |
|
65 |
== Changelog ==
|
66 |
|
67 |
+
= 2.6.9 =
|
68 |
+
* Fix: WooCommerce compatibility
|
69 |
+
|
70 |
= 2.6.8 =
|
71 |
* Fix: WooCommerce compatibility
|
72 |
|
woocommerce-direct-checkout.php
CHANGED
@@ -4,7 +4,7 @@
|
|
4 |
* Plugin Name: Direct Checkout for WooCommerce
|
5 |
* Plugin URI: https://quadlayers.com/documentation/woocommerce-direct-checkout/
|
6 |
* Description: Simplifies the checkout process to improve your sales rate.
|
7 |
-
* Version: 2.6.
|
8 |
* Author: QuadLayers
|
9 |
* Author URI: https://quadlayers.com
|
10 |
* License: GPLv3
|
@@ -17,7 +17,7 @@ if ( ! defined( 'ABSPATH' ) ) {
|
|
17 |
}
|
18 |
|
19 |
define( 'QLWCDC_PLUGIN_NAME', 'Direct Checkout for WooCommerce' );
|
20 |
-
define( 'QLWCDC_PLUGIN_VERSION', '2.6.
|
21 |
define( 'QLWCDC_PLUGIN_FILE', __FILE__ );
|
22 |
define( 'QLWCDC_PLUGIN_DIR', __DIR__ . DIRECTORY_SEPARATOR );
|
23 |
define( 'QLWCDC_PLUGIN_BASENAME', plugin_basename( __FILE__ ) );
|
4 |
* Plugin Name: Direct Checkout for WooCommerce
|
5 |
* Plugin URI: https://quadlayers.com/documentation/woocommerce-direct-checkout/
|
6 |
* Description: Simplifies the checkout process to improve your sales rate.
|
7 |
+
* Version: 2.6.9
|
8 |
* Author: QuadLayers
|
9 |
* Author URI: https://quadlayers.com
|
10 |
* License: GPLv3
|
17 |
}
|
18 |
|
19 |
define( 'QLWCDC_PLUGIN_NAME', 'Direct Checkout for WooCommerce' );
|
20 |
+
define( 'QLWCDC_PLUGIN_VERSION', '2.6.9' );
|
21 |
define( 'QLWCDC_PLUGIN_FILE', __FILE__ );
|
22 |
define( 'QLWCDC_PLUGIN_DIR', __DIR__ . DIRECTORY_SEPARATOR );
|
23 |
define( 'QLWCDC_PLUGIN_BASENAME', plugin_basename( __FILE__ ) );
|