PluginProbe
Booking Calendar / 11.8.3
Booking Calendar v11.8.3
11.8.3 11.8.2 11.8.1 11.8 11.7 11.6.1 11.6 11.5 11.4.3 11.4.2 11.4.1 11.4 11.3 11.2.1 11.2 11.1 11.0 10.15.7 10.15.6 10.1.3 10.10 10.10.1 10.10.2 10.11 10.11.2 All 203 releases
← All changes | core/any/activation.php +26 -6 10.10.211.8.3 View file →
@@ -58,8 +58,9 @@
58 58 add_filter( 'plugin_action_links', array( $this, 'plugin_links' ), 10, 2 );
59 59 // Warning message in plugin info.
60 60 add_filter( 'plugin_row_meta', array( $this, 'plugin_row_meta' ), 10, 4 );
61 61
62 + // TODO: 2025-06-06 - required to be commented, if we use the Pro version as separate plugin.
62 63 $this->check_if_need_to_update(); // Check upgrade, if was no activation process
63 64 }
64 65
65 66
@@ -105,9 +106,9 @@
105 106 $is_delete_if_deactive = get_bk_option( $this->init_option['option-is_delete_if_deactive'] ); // check
106 107
107 108 if ($is_delete_if_deactive == 'On') { ?>
108 109 <div class="plugin-update-tr">
109 - <div class="update-message notice inline notice-warning notice-altNO" style="font-size: 1em;line-height: 2em;margin:0 5px 10px;border-left: 3px solid #dd7000;"><?php
110 + <div class="update-message notice inline notice-error" style="line-height: 2.2em;border-left: 3px solid #cc1818;margin-left: 0;color: #cc1818;background: #fff6f4;"><?php
110 111 // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
111 112 echo $this->init_option['message-delete_data']; ?></div>
112 113 </div>
113 114 <?php
@@ -112,8 +113,16 @@
112 113 </div>
113 114 <?php
114 115 }
115 116
117 + $version = wpbc_get_plugin_version_title();
118 +
119 + if ( 'Free' !== $version ) {
120 + $plugin_meta[0] .= ' | ' . __( 'Version type', 'booking' ) . ': <strong>Free + ' . ucfirst( $version ) . '</strong>';
121 + } else {
122 + $plugin_meta[0] .= ' | ' . __( 'Version type', 'booking' ) . ': <strong>' . ucfirst( $version ) . '</strong>';
123 + }
124 +
116 125 /*
117 126 [$plugin_meta] => Array
118 127 (
119 128 [0] => Version 2.8.35
@@ -153,9 +162,10 @@
153 162
154 163 $this_plugin = plugin_basename( WPBC_FILE );
155 164
156 165 if ( $file == $this_plugin ) {
157 -
166 +
167 +
158 168 array_unshift( $links, $this->init_option['link_settings'] );
159 169
160 170 //array_unshift( $links, $this->init_option['link_whats_new'] );
161 171 array_unshift( $links, $this->init_option['link_faq'] );
@@ -170,9 +180,16 @@
170 180 );
171 181
172 182
173 183 if ( ! class_exists( 'wpdev_bk_personal' ) ) {
174 - array_unshift( $links, $this->init_option['link_up'] );
184 + if ( wpbc_is_updated_paid_to_free() ) {
185 + array_unshift(
186 + $links,
187 + '<a style="font-weight:600;" class="wpbc_plugins_links__start_tour" title="' . esc_attr( __( 'Request Update', 'booking' ) ) . '" href="' . esc_url( 'https://wpbookingcalendar.com/request-update/' ) . '">' . esc_attr__( 'Request Pro Version', 'booking' ) . '</a>'
188 + );
189 + } else {
190 + array_unshift( $links, $this->init_option['link_up'] );
191 + }
175 192 } else {
176 193 if ( ! class_exists( 'wpdev_bk_multiuser' ) ) {
177 194 array_unshift( $links, $this->init_option['link_upgrade'] );
178 195 }
@@ -210,15 +227,17 @@
210 227
211 228 } else {
212 229
213 230 // Check if we was update from free to paid or from lower to higher versions, and do not make normal activation. In this case we need to make update.
214 - $is_make_activation = $this->is_update_from_lower_to_high_version();
231 + // TODO: 2025-11-23 - Commented, if we use the Pro version as separate plugin.
232 + // $is_make_activation = $this->is_update_from_lower_to_high_version();
215 233
216 234 }
217 235
218 236 // Add hook for initial activation.
219 237 if ( $is_make_activation ) {
220 - add_action( 'plugins_loaded', array( $this, 'wpbc_activate_initial' ), 1030 );
238 + // add_action( 'plugins_loaded', array( $this, 'wpbc_activate_initial' ), 1030 );
239 + add_action( 'init', array( $this, 'wpbc_activate_initial' ), 1030 );
221 240 }
222 241 }
223 242 }
224 243
@@ -293,8 +312,9 @@
293 312 /**
294 313 * Run Deactivate
295 314 */
296 315 public function wpbc_deactivate() {
316 + wpbc_set_plugin_deactivation_state( true );
297 317
298 318 WPBC_Action_Scheduler_Compatibility::raise_memory_limit();
299 319 WPBC_Action_Scheduler_Compatibility::raise_time_limit( 300 );
300 320
@@ -309,5 +329,5 @@
309 329 delete_bk_option( $this->init_option['option-activation_process'] );
310 330 }
311 331 }
312 332
313 -}
333 +}