/**
  * Render info text into a variable.
  *
  * @param int $booking_step
  * @param AB_UserBookingData $userData
  * @param int $preset_price
  *
  * @return string
  */
 private function _prepareInfoText($booking_step, $userData, $preset_price = null)
 {
     if ($userData->hasData()) {
         $service_name = $userData->getServiceName();
         $category_name = $userData->getCategoryName();
         $staff_name = $userData->getStaffName();
         $price = $preset_price === null ? $userData->getServicePrice() : $preset_price;
         // Convenient Time
         if ($booking_step === 2) {
             $replacement = array('[[STAFF_NAME]]' => '<b>' . $staff_name . '</b>', '[[SERVICE_NAME]]' => '<b>' . $service_name . '</b>', '[[CATEGORY_NAME]]' => '<b>' . $category_name . '</b>');
             return str_replace(array_keys($replacement), array_values($replacement), nl2br(esc_html(get_option('ab_appearance_text_info_second_step'))));
         }
         // Your Details
         if ($booking_step === 3) {
             if (get_option('ab_settings_use_client_time_zone') && $this->getParameter('client_time_zone_offset')) {
                 $service_time = date_i18n(get_option('time_format'), strtotime($userData->getBookedDatetime()) - ($this->getParameter('client_time_zone_offset') + get_option('gmt_offset') * 60) * 60);
             } else {
                 $service_time = date_i18n(get_option('time_format'), strtotime($userData->getBookedDatetime()));
             }
             $service_date = date_i18n(get_option('date_format'), strtotime($userData->getBookedDatetime()));
             $replacement = array('[[STAFF_NAME]]' => '<b>' . $staff_name . '</b>', '[[SERVICE_NAME]]' => '<b>' . $service_name . '</b>', '[[CATEGORY_NAME]]' => '<b>' . $category_name . '</b>', '[[SERVICE_TIME]]' => '<b>' . $service_time . '</b>', '[[SERVICE_DATE]]' => '<b>' . $service_date . '</b>', '[[SERVICE_PRICE]]' => '<b>' . AB_CommonUtils::formatPrice($price) . '</b>');
             return str_replace(array_keys($replacement), array_values($replacement), nl2br(esc_html(get_option('ab_appearance_text_info_third_step'))));
         }
         // Coupon Text
         if ($booking_step === 4) {
             $replacement = array('[[SERVICE_PRICE]]' => '<b>' . AB_CommonUtils::formatPrice($price) . '</b>');
             return str_replace(array_keys($replacement), array_values($replacement), nl2br(esc_html(get_option('ab_appearance_text_info_coupon'))));
         }
     }
     return '';
 }