WooCommerce Direct Checkout - Version 2.6.9

Version Description

  • Fix: WooCommerce compatibility
Download this release

Release Info

Developer quadlayers
Plugin Icon 128x128 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 CHANGED
@@ -1,153 +1,143 @@
1
  <?php
2
 
3
- class QLWCDC_Controller_General
4
- {
5
-
6
- protected static $instance;
7
-
8
- public function __construct()
9
- {
10
-
11
- include_once(QLWCDC_PLUGIN_DIR . '/includes/view/frontend/general.php');
12
-
13
- add_action('qlwcdc_sections_header', array($this, 'add_header'));
14
- add_action('woocommerce_sections_' . QLWCDC_PREFIX, array($this, 'add_section'), 99);
15
- add_action('woocommerce_settings_save_' . QLWCDC_PREFIX, array($this, 'save_settings'));
16
- }
17
-
18
- public static function instance()
19
- {
20
- if (!isset(self::$instance)) {
21
- self::$instance = new self();
22
- }
23
- return self::$instance;
24
- }
25
-
26
- function add_header()
27
- {
28
- global $current_section;
29
- ?>
30
- <li><a href="<?php echo admin_url('admin.php?page=wc-settings&tab=' . QLWCDC_PREFIX . '&section'); ?>" class="<?php echo ($current_section == '' ? 'current' : ''); ?>"><?php esc_html_e('General', 'woocommerce-direct-checkout'); ?></a> | </li>
31
- <?php
32
- }
33
-
34
- function get_settings()
35
- {
36
-
37
- return array(
38
- array(
39
- 'name' => esc_html__('General', 'woocommerce-direct-checkout'),
40
- 'type' => 'title',
41
- 'desc' => esc_html__('Simplifies the checkout process.', 'woocommerce-direct-checkout'),
42
- 'id' => 'qlwcdc_section_title'
43
- ),
44
- array(
45
- 'name' => esc_html__('Added to cart alert', 'woocommerce-direct-checkout'),
46
- 'desc_tip' => esc_html__('Replace "View Cart" alert with direct checkout.', 'woocommerce-direct-checkout'),
47
- 'id' => 'qlwcdc_add_to_cart_message',
48
- 'type' => 'select',
49
- 'class' => 'chosen_select',
50
- 'options' => array(
51
- 'yes' => esc_html__('Yes', 'woocommerce-direct-checkout'),
52
- 'no' => esc_html__('No', 'woocommerce-direct-checkout'),
53
- ),
54
- 'default' => 'no',
55
- ),
56
- array(
57
- 'name' => esc_html__('Added to cart link', 'woocommerce-direct-checkout'),
58
- 'desc_tip' => esc_html__('Replace "View Cart" link with direct checkout.', 'woocommerce-direct-checkout'),
59
- 'id' => 'qlwcdc_add_to_cart_link',
60
- 'type' => 'select',
61
- 'class' => 'chosen_select',
62
- 'options' => array(
63
- 'yes' => esc_html__('Yes', 'woocommerce-direct-checkout'),
64
- 'no' => esc_html__('No', 'woocommerce-direct-checkout'),
65
- ),
66
- 'default' => 'no',
67
- ),
68
- array(
69
- 'name' => esc_html__('Added to cart redirect', 'woocommerce-direct-checkout'),
70
- 'desc_tip' => esc_html__('Add to cart button behaviour.', 'woocommerce-direct-checkout'),
71
- 'id' => 'qlwcdc_add_to_cart',
72
- 'type' => 'select',
73
- 'class' => 'chosen_select',
74
- 'options' => array(
75
- 'no' => esc_html__('No', 'woocommerce-direct-checkout'),
76
- //'ajax' => esc_html__('Ajax', 'woocommerce-direct-checkout'),
77
- 'redirect' => esc_html__('Yes', 'woocommerce-direct-checkout'),
78
- ),
79
- 'default' => 'no',
80
- ),
81
- array(
82
- 'name' => esc_html__('Added to cart redirect to', 'woocommerce-direct-checkout'),
83
- 'desc_tip' => esc_html__('Redirect to the cart or checkout page after successful addition.', 'woocommerce-direct-checkout'),
84
- 'id' => 'qlwcdc_add_to_cart_redirect_page',
85
- 'type' => 'select',
86
- 'class' => 'chosen_select',
87
- 'options' => array(
88
- 'cart' => esc_html__('Cart', 'woocommerce-direct-checkout'),
89
- 'checkout' => esc_html__('Checkout', 'woocommerce-direct-checkout'),
90
- 'url' => esc_html__('Custom URL', 'woocommerce-direct-checkout'),
91
- ),
92
- 'default' => 'cart',
93
- ),
94
- array(
95
- 'name' => esc_html__('Added to cart redirect to custom url', 'woocommerce-direct-checkout'),
96
- 'desc_tip' => esc_html__('Redirect to the cart or checkout page after successful addition.', 'woocommerce-direct-checkout'),
97
- 'id' => 'qlwcdc_add_to_cart_redirect_url',
98
- 'type' => 'text',
99
- 'placeholder' => wc_get_checkout_url(),
100
- ),
101
- array(
102
- 'name' => esc_html__('Replace cart url', 'woocommerce-direct-checkout'),
103
- 'desc_tip' => esc_html__('Replace cart url', 'woocommerce-direct-checkout'),
104
- 'id' => 'qlwcdc_replace_cart_url',
105
- 'type' => 'select',
106
- 'class' => 'chosen_select',
107
- 'options' => array(
108
- 'no' => esc_html__('No', 'woocommerce-direct-checkout'),
109
- 'checkout' => esc_html__('Checkout', 'woocommerce-direct-checkout'),
110
- 'custom' => esc_html__('Custom URL', 'woocommerce-direct-checkout'),
111
- ),
112
- 'default' => 'no',
113
- ),
114
- array(
115
- 'name' => esc_html__('Replace cart url with custom url', 'woocommerce-direct-checkout'),
116
- 'desc_tip' => esc_html__('Replace cart url with custom url', 'woocommerce-direct-checkout'),
117
- 'id' => 'qlwcdc_replace_cart_url_custom',
118
- 'type' => 'text',
119
- 'placeholder' => wc_get_checkout_url(),
120
- ),
121
- array(
122
- 'type' => 'sectionend',
123
- 'id' => 'qlwcdc_section_end'
124
- )
125
- );
126
- }
127
-
128
- function add_section()
129
- {
130
-
131
- global $current_section;
132
-
133
- if ('' == $current_section) {
134
-
135
- $settings = $this->get_settings();
136
-
137
- include_once(QLWCDC_PLUGIN_DIR . 'includes/view/backend/pages/general.php');
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 . '&section' ); ?>" 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.7
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
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.8' );
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__ ) );