Version Description
- Fix: php error
Download this release
Release Info
Developer | quadlayers |
Plugin | WooCommerce Direct Checkout |
Version | 2.4.3 |
Comparing to | |
See all releases |
Code changes from version 2.4.2 to 2.4.3
- includes/controller/suggestions.php +7 -0
- includes/suggestions.php +34 -25
- readme.txt +6 -3
- woocommerce-direct-checkout.php +3 -3
includes/controller/suggestions.php
CHANGED
@@ -5,6 +5,7 @@ class QLWCDC_Controller_Suggestions {
|
|
5 |
protected static $_instance;
|
6 |
|
7 |
public function __construct() {
|
|
|
8 |
add_action('admin_menu', array($this, 'add_menu'));
|
9 |
add_action('admin_init', array($this, 'add_redirect'));
|
10 |
add_action('admin_head', array($this, 'remove_menu'));
|
@@ -52,6 +53,12 @@ class QLWCDC_Controller_Suggestions {
|
|
52 |
}
|
53 |
}
|
54 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
55 |
|
56 |
public function remove_menu() {
|
57 |
?>
|
5 |
protected static $_instance;
|
6 |
|
7 |
public function __construct() {
|
8 |
+
add_action('qlwcdc_sections_header', array($this, 'add_header'));
|
9 |
add_action('admin_menu', array($this, 'add_menu'));
|
10 |
add_action('admin_init', array($this, 'add_redirect'));
|
11 |
add_action('admin_head', array($this, 'remove_menu'));
|
53 |
}
|
54 |
}
|
55 |
}
|
56 |
+
function add_header() {
|
57 |
+
?>
|
58 |
+
<li><a href="<?php echo admin_url('admin.php?page=qlwcdc_suggestions'); ?>"><?php echo esc_html__('Suggestions', 'woocommerce-direct-checkout'); ?></a></li> |
|
59 |
+
<?php
|
60 |
+
}
|
61 |
+
|
62 |
|
63 |
public function remove_menu() {
|
64 |
?>
|
includes/suggestions.php
CHANGED
@@ -1,19 +1,23 @@
|
|
1 |
<?php
|
2 |
|
3 |
-
require_once(
|
4 |
|
5 |
-
class QLWCDC_Suggestions_List_Table extends WP_Plugin_Install_List_Table
|
|
|
6 |
|
7 |
public $promote = array(
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
|
|
|
|
14 |
);
|
15 |
|
16 |
-
private function remove_plugins($plugins)
|
|
|
17 |
|
18 |
$promote = array();
|
19 |
|
@@ -28,7 +32,8 @@ class QLWCDC_Suggestions_List_Table extends WP_Plugin_Install_List_Table {
|
|
28 |
return $promote;
|
29 |
}
|
30 |
|
31 |
-
public function self_admin_url($url, $path)
|
|
|
32 |
|
33 |
if (strpos($url, 'tab=plugin-information') !== false) {
|
34 |
$url = network_admin_url($path);
|
@@ -37,7 +42,8 @@ class QLWCDC_Suggestions_List_Table extends WP_Plugin_Install_List_Table {
|
|
37 |
return $url;
|
38 |
}
|
39 |
|
40 |
-
public function network_admin_url($url, $path)
|
|
|
41 |
|
42 |
if (strpos($url, 'plugins.php') !== false) {
|
43 |
$url = self_admin_url($path);
|
@@ -46,25 +52,28 @@ class QLWCDC_Suggestions_List_Table extends WP_Plugin_Install_List_Table {
|
|
46 |
return $url;
|
47 |
}
|
48 |
|
49 |
-
public function display_rows()
|
|
|
50 |
add_filter('self_admin_url', array($this, 'self_admin_url'), 10, 2);
|
51 |
add_filter('network_admin_url', array($this, 'network_admin_url'), 10, 2);
|
52 |
parent::display_rows();
|
53 |
}
|
54 |
|
55 |
-
public function is_connected()
|
|
|
56 |
|
57 |
global $wp_version;
|
58 |
|
59 |
$http_args = array(
|
60 |
-
|
61 |
-
|
62 |
);
|
63 |
|
64 |
return is_wp_error(wp_remote_get('http://api.wordpress.org/plugins/info/1.2/', $http_args));
|
65 |
}
|
66 |
|
67 |
-
public function get_plugins()
|
|
|
68 |
|
69 |
$tk = QLWCDC_PREFIX . '_suggestions_plugins';
|
70 |
|
@@ -73,9 +82,9 @@ class QLWCDC_Suggestions_List_Table extends WP_Plugin_Install_List_Table {
|
|
73 |
if ($plugins === false) {
|
74 |
|
75 |
$args = array(
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
);
|
80 |
|
81 |
$api = plugins_api('query_plugins', $args);
|
@@ -91,9 +100,10 @@ class QLWCDC_Suggestions_List_Table extends WP_Plugin_Install_List_Table {
|
|
91 |
return $plugins;
|
92 |
}
|
93 |
|
94 |
-
public function prepare_items()
|
|
|
95 |
|
96 |
-
include_once(
|
97 |
|
98 |
global $tabs, $tab;
|
99 |
|
@@ -125,7 +135,7 @@ class QLWCDC_Suggestions_List_Table extends WP_Plugin_Install_List_Table {
|
|
125 |
$nonmenu_tabs = apply_filters('install_plugins_nonmenu_tabs', $nonmenu_tabs);
|
126 |
|
127 |
// If a non-valid menu tab has been selected, And it's not a non-menu action.
|
128 |
-
if (empty($tab) || (!isset($tabs[$tab]) && !in_array($tab, (array) $nonmenu_tabs)
|
129 |
$tab = key($tabs);
|
130 |
}
|
131 |
|
@@ -133,8 +143,7 @@ class QLWCDC_Suggestions_List_Table extends WP_Plugin_Install_List_Table {
|
|
133 |
|
134 |
|
135 |
wp_localize_script('updates', '_wpUpdatesItemCounts', array(
|
136 |
-
|
137 |
-
);
|
138 |
}
|
139 |
-
|
140 |
}
|
1 |
<?php
|
2 |
|
3 |
+
require_once(ABSPATH . 'wp-admin/includes/class-wp-plugin-install-list-table.php');
|
4 |
|
5 |
+
class QLWCDC_Suggestions_List_Table extends WP_Plugin_Install_List_Table
|
6 |
+
{
|
7 |
|
8 |
public $promote = array(
|
9 |
+
'woocommerce-checkout-manager',
|
10 |
+
'perfect-woocommerce-brands',
|
11 |
+
'autocomplete-woocommerce-orders',
|
12 |
+
'wp-whatsapp-chat',
|
13 |
+
'insta-gallery',
|
14 |
+
'wp-menu-icons',
|
15 |
+
'quadmenu',
|
16 |
+
'wp-tiktok-feed',
|
17 |
);
|
18 |
|
19 |
+
private function remove_plugins($plugins)
|
20 |
+
{
|
21 |
|
22 |
$promote = array();
|
23 |
|
32 |
return $promote;
|
33 |
}
|
34 |
|
35 |
+
public function self_admin_url($url, $path)
|
36 |
+
{
|
37 |
|
38 |
if (strpos($url, 'tab=plugin-information') !== false) {
|
39 |
$url = network_admin_url($path);
|
42 |
return $url;
|
43 |
}
|
44 |
|
45 |
+
public function network_admin_url($url, $path)
|
46 |
+
{
|
47 |
|
48 |
if (strpos($url, 'plugins.php') !== false) {
|
49 |
$url = self_admin_url($path);
|
52 |
return $url;
|
53 |
}
|
54 |
|
55 |
+
public function display_rows()
|
56 |
+
{
|
57 |
add_filter('self_admin_url', array($this, 'self_admin_url'), 10, 2);
|
58 |
add_filter('network_admin_url', array($this, 'network_admin_url'), 10, 2);
|
59 |
parent::display_rows();
|
60 |
}
|
61 |
|
62 |
+
public function is_connected()
|
63 |
+
{
|
64 |
|
65 |
global $wp_version;
|
66 |
|
67 |
$http_args = array(
|
68 |
+
'timeout' => 15,
|
69 |
+
'user-agent' => 'WordPress/' . $wp_version . '; ' . home_url('/'),
|
70 |
);
|
71 |
|
72 |
return is_wp_error(wp_remote_get('http://api.wordpress.org/plugins/info/1.2/', $http_args));
|
73 |
}
|
74 |
|
75 |
+
public function get_plugins()
|
76 |
+
{
|
77 |
|
78 |
$tk = QLWCDC_PREFIX . '_suggestions_plugins';
|
79 |
|
82 |
if ($plugins === false) {
|
83 |
|
84 |
$args = array(
|
85 |
+
'per_page' => 36,
|
86 |
+
'author' => 'quadlayers',
|
87 |
+
'locale' => get_user_locale(),
|
88 |
);
|
89 |
|
90 |
$api = plugins_api('query_plugins', $args);
|
100 |
return $plugins;
|
101 |
}
|
102 |
|
103 |
+
public function prepare_items()
|
104 |
+
{
|
105 |
|
106 |
+
include_once(ABSPATH . 'wp-admin/includes/plugin-install.php');
|
107 |
|
108 |
global $tabs, $tab;
|
109 |
|
135 |
$nonmenu_tabs = apply_filters('install_plugins_nonmenu_tabs', $nonmenu_tabs);
|
136 |
|
137 |
// If a non-valid menu tab has been selected, And it's not a non-menu action.
|
138 |
+
if (empty($tab) || (!isset($tabs[$tab]) && !in_array($tab, (array) $nonmenu_tabs))) {
|
139 |
$tab = key($tabs);
|
140 |
}
|
141 |
|
143 |
|
144 |
|
145 |
wp_localize_script('updates', '_wpUpdatesItemCounts', array(
|
146 |
+
'totals' => wp_get_update_data()
|
147 |
+
));
|
148 |
}
|
|
|
149 |
}
|
readme.txt
CHANGED
@@ -3,10 +3,10 @@ Contributors: quadlayers
|
|
3 |
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: 5.
|
7 |
-
Stable tag: 2.4.
|
8 |
WC requires at least: 3.1.0
|
9 |
-
WC tested up to: 4.
|
10 |
License: GPLv3
|
11 |
License URI: https://www.gnu.org/licenses/gpl-3.0.html
|
12 |
|
@@ -64,6 +64,9 @@ The premium version of WooCommerce Direct Checkot allows to include a quick purc
|
|
64 |
|
65 |
== Changelog ==
|
66 |
|
|
|
|
|
|
|
67 |
= 2.4.2 =
|
68 |
* Fix: translation strings
|
69 |
|
3 |
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: 5.6
|
7 |
+
Stable tag: 2.4.3
|
8 |
WC requires at least: 3.1.0
|
9 |
+
WC tested up to: 4.8.0
|
10 |
License: GPLv3
|
11 |
License URI: https://www.gnu.org/licenses/gpl-3.0.html
|
12 |
|
64 |
|
65 |
== Changelog ==
|
66 |
|
67 |
+
= 2.4.3 =
|
68 |
+
* Fix: php error
|
69 |
+
|
70 |
= 2.4.2 =
|
71 |
* Fix: translation strings
|
72 |
|
woocommerce-direct-checkout.php
CHANGED
@@ -4,13 +4,13 @@
|
|
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.4.
|
8 |
* Author: QuadLayers
|
9 |
* Author URI: https://quadlayers.com
|
10 |
* License: GPLv3
|
11 |
* Text Domain: woocommerce-direct-checkout
|
12 |
* WC requires at least: 3.1.0
|
13 |
-
* WC tested up to: 4.
|
14 |
*/
|
15 |
if (!defined('ABSPATH')) {
|
16 |
die('-1');
|
@@ -19,7 +19,7 @@ if (!defined('QLWCDC_PLUGIN_NAME')) {
|
|
19 |
define('QLWCDC_PLUGIN_NAME', 'Direct Checkout for WooCommerce');
|
20 |
}
|
21 |
if (!defined('QLWCDC_PLUGIN_VERSION')) {
|
22 |
-
define('QLWCDC_PLUGIN_VERSION', '2.4.
|
23 |
}
|
24 |
if (!defined('QLWCDC_PLUGIN_FILE')) {
|
25 |
define('QLWCDC_PLUGIN_FILE', __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.4.3
|
8 |
* Author: QuadLayers
|
9 |
* Author URI: https://quadlayers.com
|
10 |
* License: GPLv3
|
11 |
* Text Domain: woocommerce-direct-checkout
|
12 |
* WC requires at least: 3.1.0
|
13 |
+
* WC tested up to: 4.8.0
|
14 |
*/
|
15 |
if (!defined('ABSPATH')) {
|
16 |
die('-1');
|
19 |
define('QLWCDC_PLUGIN_NAME', 'Direct Checkout for WooCommerce');
|
20 |
}
|
21 |
if (!defined('QLWCDC_PLUGIN_VERSION')) {
|
22 |
+
define('QLWCDC_PLUGIN_VERSION', '2.4.3');
|
23 |
}
|
24 |
if (!defined('QLWCDC_PLUGIN_FILE')) {
|
25 |
define('QLWCDC_PLUGIN_FILE', __FILE__);
|