PluginProbe
Booking Calendar / 11.9
Booking Calendar v11.9
11.9 11.8.4 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 All 205 releases
← All changes | includes/_feedback_deactivation/feedback.php +19 -11 10.15.7 → 11.9 View file →
@@ -53,9 +53,16 @@
53 53 array( 'jquery' ),
54 54 WP_BK_VERSION_NUM,
55 55 array( 'in_footer' => WPBC_JS_IN_FOOTER )
56 56 );
57 - wp_localize_script( 'wpbc-admin-deactivation-feedback', 'wpbc_plugins_params', array( 'ajax_url' => admin_url( 'admin-ajax.php' ) ) );
57 + wp_localize_script(
58 + 'wpbc-admin-deactivation-feedback',
59 + 'wpbc_plugins_params',
60 + array(
61 + 'ajax_url' => admin_url( 'admin-ajax.php' ),
62 + 'more_details_required_text' => esc_html__( 'Please share more details before submitting.', 'booking' ),
63 + )
64 + );
58 65
59 66 wp_enqueue_style( 'wpbc-admin-deactivation-feedback', trailingslashit( plugins_url( '', __FILE__ ) ) . '_out/feedback.css', array(), WP_BK_VERSION_NUM );
60 67 }
61 68
@@ -116,8 +123,16 @@
116 123 if ( ! empty( $_POST[ "wpbc_deactivate-feedback-more-details" ] ) ) {
117 124 $reason_text = sanitize_textarea_field( wp_unslash( $_POST[ "wpbc_deactivate-feedback-more-details" ] ) );
118 125 }
119 126
127 + if ( ( '' !== $reason_slug ) && ( '' === trim( $reason_text ) || '---' === $reason_text ) ) {
128 + wp_send_json_error(
129 + array(
130 + 'message' => esc_html__( 'Please share more details before submitting.', 'booking' ),
131 + )
132 + );
133 + }
134 +
120 135 $deactivation_data = array(
121 136 'reason_text' => $reason_text,
122 137 'reason_slug' => $reason_slug,
123 138 'admin_email' => get_bloginfo( 'admin_email' ),
@@ -192,9 +207,9 @@
192 207 $fields_values['from_name'] = $us_data->display_name;
193 208 $fields_values['from_name'] = wp_specialchars_decode( esc_html( stripslashes( $fields_values['from_name'] ) ), ENT_QUOTES );
194 209 $fields_values['from_email'] = sanitize_email( $fields_values['from_email'] );
195 210
196 - $subject = 'WPBC Uninstall: ' . $uninstall_slug . '';
211 + $subject = 'Booking Calendar | Uninstall | ' . $uninstall_slug . '';
197 212
198 213
199 214 $message = '';
200 215 $message .= $feedback_description . "\n";
@@ -199,16 +214,8 @@
199 214 $message = '';
200 215 $message .= $feedback_description . "\n";
201 216 $message .= '=====' . "\n";
202 217
203 - $cleaned_data_booking_feedback_arr = get_bk_option( 'booking_feedback__after_send' );
204 - if ( ( ! empty( $cleaned_data_booking_feedback_arr ) ) && ( is_array( $cleaned_data_booking_feedback_arr ) ) ) {
205 - $feedback_description_setup = implode( "\n", $cleaned_data_booking_feedback_arr );
206 - $message .= $feedback_description_setup . "\n";
207 - $message .= '=====' . "\n";
208 - }
209 -
210 -
211 218 $message .="\n";
212 219
213 220 $message .= $fields_values['from_name'] . "\n";
214 221 $message .="\n";
@@ -246,9 +253,10 @@
246 253
247 254 $attachments = '';
248 255
249 256
250 - $to = '[email protected]';
257 + // $to = '[email protected]';
258 + $to = '[email protected]';
251 259
252 260 // debuge('In email', htmlentities($to), $subject, htmlentities($message), $headers, $attachments) ;
253 261 // debuge( '$to, $subject, $message, $headers, $attachments',htmlspecialchars($to), htmlspecialchars($subject), htmlspecialchars($message), htmlspecialchars($headers), htmlspecialchars($attachments));
254 262 if ( wpbc_email_api_is_allow_send( true, '', '' ) ) {