Advertisement
palsushobhan

appointment-display.php

Jul 15th, 2021
259
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.84 KB | None | 0 0
  1. <?php
  2. /**
  3.  * The template for displaying an appointment summary to customers.
  4.  * It will display in three places:
  5.  * - After checkout,
  6.  * - In the order confirmation email, and
  7.  * - When customer reviews order in My Account > Orders.
  8.  *
  9.  * This template can be overridden by copying it to yourtheme/woocommerce/order/appointment-display.php.
  10.  *
  11.  * HOWEVER, on occasion we will need to update template files and you
  12.  * (the theme developer) will need to copy the new files to your theme to
  13.  * maintain compatibility. We try to do this as little as possible, but it does
  14.  * happen. When this occurs the version of the template file will be bumped and
  15.  * the readme will list any important changes.
  16.  *
  17.  * @see     https://docs.woocommerce.com/document/template-structure/
  18.  * @version 4.12.0
  19.  * @since   3.4.0
  20.  */
  21.  
  22. // Exit if accessed directly.
  23. defined( 'ABSPATH' ) || exit;
  24.  
  25. if ( $appointment_ids ) {
  26.     foreach ( $appointment_ids as $appointment_id ) {
  27.         $appointment = get_wc_appointment( $appointment_id );
  28.         ?>
  29.         <div class="wc-appointment-summary" style="margin-top: 10px; margin-bottom: 10px;">
  30.             <div class="wc-appointment-summary-name">
  31.                 <strong<?php if ( isset( $is_rtl ) && 'right' === $is_rtl ) : ?> dir="rtl"<?php endif; ?>>
  32.                     <?php
  33.                     /* translators: %s: appointment ID */
  34.                     echo esc_html( sprintf( __( 'Appointment #%s', 'woocommerce-appointments' ), (string) $appointment->get_id() ) );
  35.                     ?>
  36.                 </strong>
  37.                 <?php if ( is_wc_endpoint_url( 'view-order' ) || is_wcfm_order_details_page() ) : ?>
  38.                 &mdash;
  39.                 <small class="status-<?php echo esc_attr( $appointment->get_status() ); ?>">
  40.                     <?php echo esc_attr( wc_appointments_get_status_label( $appointment->get_status() ) ); ?>
  41.                 </small>
  42.                 <?php endif; ?>
  43.             </div>
  44.             <?php wc_appointments_get_summary_list( $appointment ); ?>
  45.         </div>
  46.         <?php
  47.     }
  48. }
  49.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement