PluginProbe
Bookit — Booking & Appointment Calendar / 2.6.0.5
Bookit — Booking & Appointment Calendar v2.6.0.5
2.6.0.5 2.6.0.4 2.6.0.3 2.6.0.2 2.6.0.1 2.6.0 trunk 1.2 1.2.2 1.2.3 2.0.0 2.0.1 2.0.2 2.0.3 2.0.4 2.0.5 2.0.6 2.0.7 2.0.8 2.0.9 2.1.0 2.1.1 2.1.2 2.1.3 2.1.4 All 62 releases
← All changes | includes/classes/Notifications.php +16 -2 trunk2.6.0.5 View file →
@@ -190,8 +190,22 @@
190 190 $appointment = Appointments::get_full_appointment_by_id( $appointment_id );
191 191 $status = $appointment->status;
192 192 $payment_status = $appointment->payment_status;
193 193
194 + $payment_status_labels = array(
195 + 'pending' => __( 'pending', 'bookit' ),
196 + 'cancelled' => __( 'cancelled', 'bookit' ),
197 + 'rejected' => __( 'rejected', 'bookit' ),
198 + 'complete' => __( 'complete', 'bookit' ),
199 + );
200 +
201 + $appointment_status_labels = array(
202 + 'pending' => __( 'pending', 'bookit' ),
203 + 'approved' => __( 'approved', 'bookit' ),
204 + 'cancelled' => __( 'cancelled', 'bookit' ),
205 + 'delete' => __( 'delete', 'bookit' ),
206 + );
207 +
194 208 $vars = array(
195 209 '[admin]' => get_option( 'admin_email' ),
196 210 '[staff]' => $appointment->staff_email,
197 211 '[customer]' => $appointment->customer_email,
@@ -204,12 +218,12 @@
204 218 '[appointment_id]' => $appointment->id,
205 219 '[appointment_day]' => date( get_option( 'date_format' ), $appointment->date_timestamp ),
206 220 '[start_time]' => date( get_option( 'time_format' ), $appointment->start_time ),
207 221 '[payment_method]' => $appointment->payment_method,
208 - '[payment_status]' => __( $payment_status, 'bookit' ), // phpcs:ignore WordPress.WP.I18n.NonSingularStringLiteralText
222 + '[payment_status]' => $payment_status_labels[ $payment_status ] ?? $payment_status,
209 223 '[price]' => $appointment->price,
210 224 '[total]' => bookit_price( $appointment->price ),
211 - '[status]' => __( $status, 'bookit' ), // phpcs:ignore WordPress.WP.I18n.NonSingularStringLiteralText
225 + '[status]' => $appointment_status_labels[ $status ] ?? $status,
212 226 '[reason]' => $reason,
213 227 );
214 228
215 229 return $vars;