email_service = new EmailService(); } public function register(): void { add_action( 'admin_post_abientot_send_test_email', array( $this, 'send_test_email' ) ); } /** * Renders template helper, preview, and test email controls. */ public function render_tools(): void { $template_key = (string) ( Request::view( 'template', 'key' ) ?? 'customer_confirmation' ); if ( ! isset( EmailService::template_labels()[ $template_key ] ) ) { $template_key = 'customer_confirmation'; } $booking_id = (int) Request::view( 'booking_id', 'int' ); $preview = $this->email_service->preview( $template_key, $booking_id ); $this->notice(); ?>
{business_name} {booking_id} {customer_name} {customer_email} {customer_phone} {service_name} {staff_name} {location_name} {status} {start} {end} {price} {payment_status} {customer_note} {site_url} {cancellation_contact} {rescheduling_contact}
' . esc_html( $map[ $notice ][1] ) . '