PluginProbe
Timetics – Appointment Booking Calendar & Scheduling / 1.0.64
Timetics – Appointment Booking Calendar & Scheduling v1.0.64
1.0.64 1.0.62 1.0.63 1.0.61 1.0.60 1.0.59 1.0.58 1.0.57 1.0.56 trunk 1.0.0 1.0.1 1.0.10 1.0.11 1.0.12 1.0.13 1.0.14 1.0.15 1.0.16 1.0.17 1.0.18 1.0.19 1.0.2 1.0.20 1.0.21 All 65 releases
← All changes | core/integrations/stripe/api-stripe.php +16 -0 1.0.62 → 1.0.64 View file →
@@ -156,8 +156,24 @@
156 156
157 157 return new WP_HTTP_Response( $response, 403 );
158 158 }
159 159
160 + if ( is_array( $payment ) && ! empty( $payment['error'] ) ) {
161 + if ( defined( 'WP_DEBUG' ) && WP_DEBUG && defined( 'WP_DEBUG_LOG' ) && WP_DEBUG_LOG ) {
162 + // phpcs:ignore WordPress.PHP.DevelopmentFunctions.error_log_error_log -- Debug logging is guarded by WP_DEBUG checks.
163 + error_log( 'Timetics Stripe payment intent failed: ' . wp_json_encode( $payment['error'] ) );
164 + }
165 +
166 + return new WP_HTTP_Response(
167 + [
168 + 'success' => 0,
169 + 'status_code' => 402,
170 + 'message' => __( 'We could not start the payment. Please try again.', 'timetics' ),
171 + ],
172 + 402
173 + );
174 + }
175 +
160 176 return rest_ensure_response( $payment );
161 177 }
162 178
163 179 /**