Version Description
Download this release
Release Info
Developer | quadlayers |
Plugin | WooCommerce Checkout Manager |
Version | 6.2.1 |
Comparing to | |
See all releases |
Code changes from version 6.2.0 to 6.2.1
- includes/class-wooccm-install.php +1 -1
- includes/class-wooccm-notices.php +161 -28
- readme.txt +3 -0
- woocommerce-checkout-manager.php +2 -2
includes/class-wooccm-install.php
CHANGED
@@ -13,7 +13,7 @@ class WOOCCM_Install
|
|
13 |
|
14 |
// If we made it till here nothing is running yet, lets set the transient now.
|
15 |
set_transient('wooccm_installing', 'yes', MINUTE_IN_SECONDS * 10);
|
16 |
-
set_transient('wooccm-
|
17 |
|
18 |
//wooccm_install();
|
19 |
}
|
13 |
|
14 |
// If we made it till here nothing is running yet, lets set the transient now.
|
15 |
set_transient('wooccm_installing', 'yes', MINUTE_IN_SECONDS * 10);
|
16 |
+
set_transient('wooccm-notice-delay', true, MONTH_IN_SECONDS);
|
17 |
|
18 |
//wooccm_install();
|
19 |
}
|
includes/class-wooccm-notices.php
CHANGED
@@ -23,6 +23,7 @@ class WOOCCM_Notices {
|
|
23 |
$notice_id = sanitize_key( $_REQUEST['notice_id'] );
|
24 |
|
25 |
update_user_meta( get_current_user_id(), $notice_id, true );
|
|
|
26 |
|
27 |
wp_send_json( $notice_id );
|
28 |
}
|
@@ -31,33 +32,13 @@ class WOOCCM_Notices {
|
|
31 |
}
|
32 |
|
33 |
public function add_notices() {
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
<img style="border-radius:50%;max-width: 90px;" src="<?php echo esc_url( plugins_url( '/assets/backend/img/logo.jpg', WOOCCM_PLUGIN_FILE ) ); ?>" alt="<?php echo esc_html( WOOCCM_PLUGIN_NAME ); ?>>">
|
40 |
-
</div>
|
41 |
-
<div class="notice-content" style="margin-left: 15px;">
|
42 |
-
<p>
|
43 |
-
<?php printf( esc_html__( 'Hello! We\'ve recently acquired this plugin!', 'woocommerce-checkout-manager' ), esc_html( WOOCCM_PLUGIN_NAME ) ); ?>
|
44 |
-
<br />
|
45 |
-
<?php esc_html_e( 'We will do our best to improve it and include new features gradually. Please be patient and let us know about the issues and improvements that you want to see in this plugin.', 'woocommerce-checkout-manager' ); ?>
|
46 |
-
</p>
|
47 |
-
<a href="<?php echo esc_url( WOOCCM_GROUP_URL ); ?>" class="button-primary" target="_blank">
|
48 |
-
<?php esc_html_e( 'Join Community!', 'woocommerce-checkout-manager' ); ?>
|
49 |
-
</a>
|
50 |
-
<a href="<?php echo esc_url( WOOCCM_SUPPORT_URL ); ?>" class="button-secondary" target="_blank">
|
51 |
-
<?php esc_html_e( 'Report a bug', 'woocommerce-checkout-manager' ); ?>
|
52 |
-
</a>
|
53 |
-
<a style="margin-left: 10px;" href="https://quadlayers.com/?utm_source=wooccm_admin" target="_blank">
|
54 |
-
<?php esc_html_e( 'About us', 'woocommerce-checkout-manager' ); ?>
|
55 |
-
</a>
|
56 |
-
</div>
|
57 |
-
</div>
|
58 |
-
</div>
|
59 |
-
<?php
|
60 |
}
|
|
|
61 |
?>
|
62 |
<script>
|
63 |
(function($) {
|
@@ -80,14 +61,166 @@ class WOOCCM_Notices {
|
|
80 |
})(jQuery);
|
81 |
</script>
|
82 |
<?php
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
83 |
}
|
84 |
|
85 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
86 |
$links[] = '<a target="_blank" href="' . WOOCCM_PURCHASE_URL . '">' . esc_html__( 'Premium', 'woocommerce-checkout-manager' ) . '</a>';
|
87 |
$links[] = '<a href="' . admin_url( 'admin.php?page=wc-settings&tab=' . sanitize_title( WOOCCM_PREFIX ) ) . '">' . esc_html__( 'Settings', 'woocommerce-checkout-manager' ) . '</a>';
|
88 |
-
|
89 |
return $links;
|
90 |
}
|
|
|
91 |
}
|
92 |
|
93 |
WOOCCM_Notices::instance();
|
23 |
$notice_id = sanitize_key( $_REQUEST['notice_id'] );
|
24 |
|
25 |
update_user_meta( get_current_user_id(), $notice_id, true );
|
26 |
+
set_transient( 'wooccm-notice-delay', true, MONTH_IN_SECONDS );
|
27 |
|
28 |
wp_send_json( $notice_id );
|
29 |
}
|
32 |
}
|
33 |
|
34 |
public function add_notices() {
|
35 |
+
|
36 |
+
$transient = get_transient( 'wooccm-notice-delay' );
|
37 |
+
|
38 |
+
if ( $transient ) {
|
39 |
+
return;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
40 |
}
|
41 |
+
|
42 |
?>
|
43 |
<script>
|
44 |
(function($) {
|
61 |
})(jQuery);
|
62 |
</script>
|
63 |
<?php
|
64 |
+
|
65 |
+
$user_rating = ! get_user_meta( get_current_user_id(), 'wooccm-user-rating', true );
|
66 |
+
$user_premium = ! get_user_meta( get_current_user_id(), 'wooccm-user-premium', true ) && ! $this->is_installed( 'woocommerce-checkout-manager-pro/woocommerce-checkout-manager-pro.php' );
|
67 |
+
$user_cross_sell = ! get_user_meta( get_current_user_id(), 'wooccm-user-cross-sell', true );
|
68 |
+
|
69 |
+
if ( $user_rating ) {
|
70 |
+
?>
|
71 |
+
<div id="wooccm-admin-rating" class="wooccm-notice notice notice-info is-dismissible" data-notice_id="wooccm-user-rating">
|
72 |
+
<div class="notice-container" style="padding-top: 10px; padding-bottom: 10px; display: flex; justify-content: left; align-items: center;">
|
73 |
+
<div class="notice-image">
|
74 |
+
<img style="border-radius:50%;max-width: 90px;" src="<?php echo plugins_url( '/assets/backend/img/logo.jpg', WOOCCM_PLUGIN_FILE ); ?>" alt="<?php echo esc_html( WOOCCM_PLUGIN_NAME ); ?>>">
|
75 |
+
</div>
|
76 |
+
<div class="notice-content" style="margin-left: 15px;">
|
77 |
+
<p>
|
78 |
+
<?php printf( esc_html__( 'Hello! Thank you for choosing the %s plugin!', 'woocommerce-checkout-manager' ), WOOCCM_PLUGIN_NAME ); ?>
|
79 |
+
<br/>
|
80 |
+
<?php esc_html_e( 'Could you please give it a 5-star rating on WordPress?. Your feedback will boost our motivation and help us promote and continue to improve this product.', 'woocommerce-checkout-manager' ); ?>
|
81 |
+
</p>
|
82 |
+
<a href="<?php echo esc_url( WOOCCM_REVIEW_URL ); ?>" class="button-primary" target="_blank">
|
83 |
+
<?php esc_html_e( 'Yes, of course!', 'woocommerce-checkout-manager' ); ?>
|
84 |
+
</a>
|
85 |
+
<a href="<?php echo esc_url( WOOCCM_SUPPORT_URL ); ?>" class="button-secondary" target="_blank">
|
86 |
+
<?php esc_html_e( 'Report a bug', 'woocommerce-checkout-manager' ); ?>
|
87 |
+
</a>
|
88 |
+
</div>
|
89 |
+
</div>
|
90 |
+
</div>
|
91 |
+
<?php
|
92 |
+
return;
|
93 |
+
}
|
94 |
+
|
95 |
+
if ( ! $user_rating && $user_premium ) {
|
96 |
+
?>
|
97 |
+
<div class="wooccm-notice notice notice-info is-dismissible" data-notice_id="wooccm-user-premium">
|
98 |
+
<div class="notice-container" style="padding-top: 10px; padding-bottom: 10px; display: flex; justify-content: left; align-items: center;">
|
99 |
+
<div class="notice-image">
|
100 |
+
<img style="border-radius:50%;max-width: 90px;" src="<?php echo esc_url( plugins_url( '/assets/backend/img/logo.jpg', WOOCCM_PLUGIN_FILE ) ); ?>" alt="<?php echo esc_html( WOOCCM_PLUGIN_NAME ); ?>>">
|
101 |
+
</div>
|
102 |
+
<div class="notice-content" style="margin-left: 15px;">
|
103 |
+
<p>
|
104 |
+
<?php esc_html_e( 'Hello! We have a special gift!', 'woocommerce-checkout-manager' ); ?>
|
105 |
+
<br />
|
106 |
+
<?php
|
107 |
+
printf(
|
108 |
+
esc_html__( 'Today we want to make you a special gift. Using this coupon before the next 48 hours you can get a 20 percent discount on the premium version of the %s plugin.', 'woocommerce-checkout-manager' ),
|
109 |
+
esc_html( WOOCCM_PLUGIN_NAME )
|
110 |
+
)
|
111 |
+
?>
|
112 |
+
</p>
|
113 |
+
<a href="<?php echo esc_url( WOOCCM_PURCHASE_URL ); ?>" class="button-primary" target="_blank">
|
114 |
+
<?php esc_html_e( 'More info', 'woocommerce-checkout-manager' ); ?>
|
115 |
+
</a>
|
116 |
+
<input style="width:95px" type="text" value="ADMINPANEL20%"/>
|
117 |
+
</div>
|
118 |
+
</div>
|
119 |
+
</div>
|
120 |
+
<?php
|
121 |
+
return;
|
122 |
+
}
|
123 |
+
|
124 |
+
if ( ! $user_rating && ! $user_premium && $user_cross_sell ) {
|
125 |
+
|
126 |
+
$cross_sell = $this->get_cross_sell();
|
127 |
+
|
128 |
+
if ( empty( $cross_sell ) ) {
|
129 |
+
return;
|
130 |
+
}
|
131 |
+
|
132 |
+
list($title, $description, $link, $action, $action_link) = $cross_sell;
|
133 |
+
|
134 |
+
?>
|
135 |
+
<div class="wooccm-notice notice notice-info is-dismissible" data-notice_id="wooccm-user-cross-sell">
|
136 |
+
<div class="notice-container" style="padding-top: 10px; padding-bottom: 10px; display: flex; justify-content: left; align-items: center;">
|
137 |
+
<div class="notice-image">
|
138 |
+
<img style="border-radius:50%;max-width: 90px;" src="<?php echo plugins_url( '/assets/backend/img/logo.jpg', WOOCCM_PLUGIN_FILE ); ?>" alt="<?php echo esc_html( WOOCCM_PLUGIN_NAME ); ?>>">
|
139 |
+
</div>
|
140 |
+
<div class="notice-content" style="margin-left: 15px;">
|
141 |
+
<p>
|
142 |
+
<?php printf( esc_html__( 'Hello! We want to invite you to try our %s plugin!', 'woocommerce-checkout-manager' ), $title ); ?>
|
143 |
+
<br/>
|
144 |
+
<?php echo esc_html( $description ); ?>
|
145 |
+
</p>
|
146 |
+
<a href="<?php echo esc_url( $action_link ); ?>" class="button-primary">
|
147 |
+
<?php echo esc_html( $action ); ?>
|
148 |
+
</a>
|
149 |
+
<a href="<?php echo esc_url( $link ); ?>" class="button-secondary" target="_blank">
|
150 |
+
<?php esc_html_e( 'More info', 'woocommerce-checkout-manager' ); ?>
|
151 |
+
</a>
|
152 |
+
</div>
|
153 |
+
</div>
|
154 |
+
</div>
|
155 |
+
<?php
|
156 |
+
return;
|
157 |
+
}
|
158 |
+
|
159 |
}
|
160 |
|
161 |
+
function get_cross_sell() {
|
162 |
+
|
163 |
+
$title = 'Direct Checkout';
|
164 |
+
$description = esc_html__( 'Direct Checkout for WooCommerce allows you to reduce the steps in the checkout process by skipping the shopping cart page. This can encourage buyers to shop more and quickly. You will increase your sales reducing cart abandonment.', 'woocommerce-checkout-manager' );
|
165 |
+
$link = 'https://quadlayers.com/portfolio/woocommerce-direct-checkout/?utm_source=wooccm_admin';
|
166 |
+
|
167 |
+
$screen = get_current_screen();
|
168 |
+
|
169 |
+
if ( isset( $screen->parent_file ) && 'plugins.php' === $screen->parent_file && 'update' === $screen->id ) {
|
170 |
+
return array();
|
171 |
+
}
|
172 |
+
|
173 |
+
$plugin_slug = 'woocommerce-direct-checkout';
|
174 |
+
|
175 |
+
$plugin_file = "{$plugin_slug}/{$plugin_slug}.php";
|
176 |
+
|
177 |
+
if ( is_plugin_active( $plugin_file ) ) {
|
178 |
+
return array();
|
179 |
+
}
|
180 |
+
|
181 |
+
if ( $this->is_installed( $plugin_file ) ) {
|
182 |
+
|
183 |
+
if ( ! current_user_can( 'activate_plugins' ) ) {
|
184 |
+
return array();
|
185 |
+
}
|
186 |
+
|
187 |
+
return array(
|
188 |
+
$title,
|
189 |
+
$description,
|
190 |
+
$link,
|
191 |
+
esc_html__( 'Activate', 'woocommerce-checkout-manager' ),
|
192 |
+
wp_nonce_url( "plugins.php?action=activate&plugin={$plugin_file}&plugin_status=all&paged=1", "activate-plugin_{$plugin_file}" ),
|
193 |
+
);
|
194 |
+
|
195 |
+
}
|
196 |
+
|
197 |
+
if ( ! current_user_can( 'install_plugins' ) ) {
|
198 |
+
return array();
|
199 |
+
}
|
200 |
+
|
201 |
+
return array(
|
202 |
+
$title,
|
203 |
+
$description,
|
204 |
+
$link,
|
205 |
+
esc_html__( 'Install', 'woocommerce-checkout-manager' ),
|
206 |
+
wp_nonce_url( self_admin_url( "update.php?action=install-plugin&plugin={$plugin_slug}" ), "install-plugin_{$plugin_slug}" ),
|
207 |
+
);
|
208 |
+
|
209 |
+
}
|
210 |
+
|
211 |
+
function is_installed( $path ) {
|
212 |
+
|
213 |
+
$installed_plugins = get_plugins();
|
214 |
+
|
215 |
+
return isset( $installed_plugins[ $path ] );
|
216 |
+
}
|
217 |
+
|
218 |
+
function add_action_links( $links ) {
|
219 |
$links[] = '<a target="_blank" href="' . WOOCCM_PURCHASE_URL . '">' . esc_html__( 'Premium', 'woocommerce-checkout-manager' ) . '</a>';
|
220 |
$links[] = '<a href="' . admin_url( 'admin.php?page=wc-settings&tab=' . sanitize_title( WOOCCM_PREFIX ) ) . '">' . esc_html__( 'Settings', 'woocommerce-checkout-manager' ) . '</a>';
|
|
|
221 |
return $links;
|
222 |
}
|
223 |
+
|
224 |
}
|
225 |
|
226 |
WOOCCM_Notices::instance();
|
readme.txt
CHANGED
@@ -149,6 +149,9 @@ Your Order data can be reviewed in each order within the default WooCommerce Ord
|
|
149 |
|
150 |
== Changelog ==
|
151 |
|
|
|
|
|
|
|
152 |
= 6.2.0
|
153 |
* Fix. PHP erros
|
154 |
|
149 |
|
150 |
== Changelog ==
|
151 |
|
152 |
+
= 6.2.1
|
153 |
+
* Fix. PHP erros
|
154 |
+
|
155 |
= 6.2.0
|
156 |
* Fix. PHP erros
|
157 |
|
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: Manage and customize WooCommerce Checkout fields (Add, Edit, Delete or re-order fields).
|
7 |
-
* Version: 6.2.
|
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', '6.2.
|
24 |
}
|
25 |
if ( ! defined( 'WOOCCM_PLUGIN_FILE' ) ) {
|
26 |
define( 'WOOCCM_PLUGIN_FILE', __FILE__ );
|
4 |
* Plugin Name: Checkout Fields Manager for WooCommerce
|
5 |
* Plugin URI: https://quadlayers.com/portfolio/woocommerce-checkout-manager/
|
6 |
* Description: Manage and customize WooCommerce Checkout fields (Add, Edit, Delete or re-order fields).
|
7 |
+
* Version: 6.2.1
|
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', '6.2.1' );
|
24 |
}
|
25 |
if ( ! defined( 'WOOCCM_PLUGIN_FILE' ) ) {
|
26 |
define( 'WOOCCM_PLUGIN_FILE', __FILE__ );
|