WooCommerce Checkout Manager - Version 5.4.4

Version Description

  • New. QuadLayers dashboard widget
Download this release

Release Info

Developer quadlayers
Plugin Icon 128x128 WooCommerce Checkout Manager
Version 5.4.4
Comparing to
See all releases

Code changes from version 5.4.3 to 5.4.4

includes/quadlayers/widget.php ADDED
@@ -0,0 +1,100 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class QL_Widget
4
+ {
5
+ protected static $instance;
6
+
7
+ public function __construct()
8
+ {
9
+ if (is_admin()) {
10
+ add_action('wp_network_dashboard_setup', [$this, 'add_dashboard_widget'], -10);
11
+ add_action('wp_dashboard_setup', [$this, 'add_dashboard_widget'], -10);
12
+ }
13
+ }
14
+
15
+ public function add_dashboard_widget()
16
+ {
17
+ wp_add_dashboard_widget(
18
+ 'quadlayers-dashboard-overview',
19
+ __('QuadLayers News', 'woocommerce-checkout-manager'),
20
+ [$this, 'display_dashboard_widget']
21
+ );
22
+ }
23
+
24
+ public function display_dashboard_widget()
25
+ {
26
+ $rss = fetch_feed('https://quadlayers.com/news/feed/');
27
+
28
+ if (is_wp_error($rss)) {
29
+ printf('<p><strong>%s: </strong>%s</p>', __('Error', 'woocommerce-checkout-manager'), $rss->get_error_message());
30
+ return;
31
+ }
32
+
33
+ if (!$rss->get_item_quantity()) {
34
+ printf('<ul><li>%s</li></ul>', __('An error has occurred, which probably means the feed is down. Try again later', 'woocommerce-checkout-manager'));
35
+ $rss->__destruct();
36
+ unset($rss);
37
+ return;
38
+ }
39
+ ?>
40
+ <div>
41
+ <div>
42
+ <div style="margin-top: 11px;float: left;width: 70%;">
43
+ <?php esc_html_e('Hi! We are Quadlayers! Welcome to QuadLayers! We’re a team of international people who have been working in the WordPress sphere for the last ten years.', 'woocommerce-checkout-manager'); ?>
44
+ <div style="margin-top: 11px; float: left; width: 70%;"><a href="<?php echo admin_url('admin.php?page=' . WOOCCM_PREFIX . '_suggestions'); ?>" target="_blank" class="button button-secondary"><?php esc_html_e('More products', 'woocommerce-checkout-manager'); ?></a></div>
45
+ </div>
46
+ <img style="width: 30%;margin-top: 11px;float: right; max-width: 95px;" src="<?php echo plugins_url('/assets/backend/img/quadlayers.jpg', WOOCCM_PLUGIN_FILE); ?>" />
47
+ </div>
48
+ <div style="clear: both;"></div>
49
+ </div>
50
+ <div style="margin: 16px -12px 0; padding: 12px 12px 0;border-top: 1px solid #eee;">
51
+ <ul>
52
+ <?php
53
+ foreach ($rss->get_items(0, 3) as $item) {
54
+ $link = $item->get_link();
55
+ while (stristr($link, 'http') !== $link) {
56
+ $link = substr($link, 1);
57
+ }
58
+
59
+ $link = esc_url(strip_tags($link . '?utm_source=ql_dashboard'));
60
+ $title = esc_html(trim(strip_tags($item->get_title())));
61
+
62
+ if (empty($title)) {
63
+ $title = __('Untitled', 'woocommerce-checkout-manager');
64
+ }
65
+
66
+ $desc = html_entity_decode($item->get_description(), ENT_QUOTES, get_option('blog_charset'));
67
+ $desc = esc_attr(wp_trim_words($desc, 15, '...'));
68
+ $summary = $desc;
69
+ $summary = '<div class="rssSummary">' . $summary . '</div>';
70
+
71
+ $date = $item->get_date('U');
72
+ if ($date) {
73
+ $date = '<span class="rss-date">' . date_i18n(get_option('date_format'), $date) . '</span>';
74
+ }
75
+ $author = $item->get_author();
76
+ $author = ucfirst($author->get_name());
77
+ $author = ' <cite>' . esc_html(strip_tags($author)) . '</cite>';
78
+
79
+ printf(__('<li><a href="%s" target="_blank">%s </a>%s%s%s</li>', 'woocommerce-checkout-manager'), $link, $title, $date, $summary, $author);
80
+ } ?>
81
+ </ul>
82
+ </div>
83
+ <div style="display: flex; justify-content: space-between;align-items: center;margin: 16px -12px 0;padding: 12px 12px 0; border-top: 1px solid #eee;">
84
+ <a href="<?php printf('https://quadlayers.com/blog/?utm_source=%s&utm_medium=software&utm_campaign=wordpress&utm_content=dashboard', WOOCCM_PREFIX); ?>" target="_blank"><?php esc_html_e('Read more like this on our blog', 'woocommerce-checkout-manager') ?></a>
85
+ <a class="button-primary" href="<?php printf('https://quadlayers.com/?utm_source=%s&utm_medium=software&utm_campaign=wordpress&utm_content=dashboard', WOOCCM_PREFIX); ?>" target="_blank"><?php esc_html_e('QuadLayers', 'woocommerce-checkout-manager') ?></a>
86
+ </div>
87
+ <?php
88
+ }
89
+
90
+ public static function instance()
91
+ {
92
+ if (!isset(self::$instance)) {
93
+ self::$instance = new self();
94
+ }
95
+ return self::$instance;
96
+ }
97
+ }
98
+
99
+
100
+ QL_Widget::instance();
readme.txt CHANGED
@@ -4,7 +4,7 @@ Donate link: https://quadlayers.com/
4
  Tags: woocommerce, woocommerce checkout, field manager, checkout editor, checkout field, shipping field, billing field, order field, additional field
5
  Requires at least: 3.4
6
  Tested up to: 5.8
7
- Stable tag: 5.4.3
8
  WC requires at least: 3.1.0
9
  WC tested up to: 5.5
10
  License: GPLv3
@@ -107,7 +107,10 @@ Your Order data can be reviewed in each order within the default WooCommerce Ord
107
 
108
  == Changelog ==
109
 
110
- = 5.4.3 =
 
 
 
111
  * Fix: WordPress compatibility
112
 
113
  = 5.4.2 =
4
  Tags: woocommerce, woocommerce checkout, field manager, checkout editor, checkout field, shipping field, billing field, order field, additional field
5
  Requires at least: 3.4
6
  Tested up to: 5.8
7
+ Stable tag: 5.4.4
8
  WC requires at least: 3.1.0
9
  WC tested up to: 5.5
10
  License: GPLv3
107
 
108
  == Changelog ==
109
 
110
+ = 5.4.4 =
111
+ * New. QuadLayers dashboard widget
112
+
113
+ = 5.4.3 =
114
  * Fix: WordPress compatibility
115
 
116
  = 5.4.2 =
woocommerce-checkout-manager.php CHANGED
@@ -4,7 +4,7 @@
4
  * Plugin Name: Checkout Fields Manager for WooCommerce
5
  * Plugin URI: https://quadlayers.com/portfolio/woocommerce-checkout-manager/
6
  * Description: Manages WooCommerce Checkout, the advanced way.
7
- * Version: 5.4.3
8
  * Author: QuadLayers
9
  * Author URI: https://quadlayers.com
10
  * License: GPLv3
@@ -20,7 +20,7 @@ if (!defined('WOOCCM_PLUGIN_NAME')) {
20
  define('WOOCCM_PLUGIN_NAME', 'Checkout Fields Manager for WooCommerce');
21
  }
22
  if (!defined('WOOCCM_PLUGIN_VERSION')) {
23
- define('WOOCCM_PLUGIN_VERSION', '5.4.3');
24
  }
25
  if (!defined('WOOCCM_PLUGIN_FILE')) {
26
  define('WOOCCM_PLUGIN_FILE', __FILE__);
@@ -60,6 +60,10 @@ if (!class_exists('WOOCCM', false)) {
60
  include_once(WOOCCM_PLUGIN_DIR . 'includes/class-wooccm.php');
61
  }
62
 
 
 
 
 
63
  function WOOCCM()
64
  { // phpcs:ignore WordPress.NamingConventions.ValidFunctionName.FunctionNameInvalid
65
  return WOOCCM::instance();
4
  * Plugin Name: Checkout Fields Manager for WooCommerce
5
  * Plugin URI: https://quadlayers.com/portfolio/woocommerce-checkout-manager/
6
  * Description: Manages WooCommerce Checkout, the advanced way.
7
+ * Version: 5.4.4
8
  * Author: QuadLayers
9
  * Author URI: https://quadlayers.com
10
  * License: GPLv3
20
  define('WOOCCM_PLUGIN_NAME', 'Checkout Fields Manager for WooCommerce');
21
  }
22
  if (!defined('WOOCCM_PLUGIN_VERSION')) {
23
+ define('WOOCCM_PLUGIN_VERSION', '5.4.4');
24
  }
25
  if (!defined('WOOCCM_PLUGIN_FILE')) {
26
  define('WOOCCM_PLUGIN_FILE', __FILE__);
60
  include_once(WOOCCM_PLUGIN_DIR . 'includes/class-wooccm.php');
61
  }
62
 
63
+ if (!class_exists('QL_Widget')) {
64
+ include_once(WOOCCM_PLUGIN_DIR . 'includes/quadlayers/widget.php');
65
+ }
66
+
67
  function WOOCCM()
68
  { // phpcs:ignore WordPress.NamingConventions.ValidFunctionName.FunctionNameInvalid
69
  return WOOCCM::instance();