thankyou.php (4390B)
1 <?php 2 /** 3 * Thankyou page 4 * 5 * This template can be overridden by copying it to yourtheme/woocommerce/checkout/thankyou.php. 6 * 7 * HOWEVER, on occasion WooCommerce will need to update template files and you 8 * (the theme developer) will need to copy the new files to your theme to 9 * maintain compatibility. We try to do this as little as possible, but it does 10 * happen. When this occurs the version of the template file will be bumped and 11 * the readme will list any important changes. 12 * 13 * @see https://docs.woocommerce.com/document/template-structure/ 14 * @package WooCommerce\Templates 15 * @version 3.7.0 16 */ 17 18 defined( 'ABSPATH' ) || exit; 19 ?> 20 21 <div class="woocommerce-order"> 22 23 <?php if ( $order ) : 24 25 do_action( 'woocommerce_before_thankyou', $order->get_id() ); ?> 26 27 <?php if ($order->has_status('failed')) : ?> 28 29 <p class="woocommerce-notice woocommerce-notice--error woocommerce-thankyou-order-failed"><?php esc_html_e('Unfortunately your order cannot be processed as the originating bank/merchant has declined your transaction. Please attempt your purchase again.', 'materialis'); ?></p> 30 31 <p class="woocommerce-notice woocommerce-notice--error woocommerce-thankyou-order-failed-actions"> 32 <a href="<?php echo esc_url($order->get_checkout_payment_url()); ?>" class="button pay"><?php esc_html_e('Pay', 'materialis') ?></a> 33 <?php if (is_user_logged_in()) : ?> 34 <a href="<?php echo esc_url(wc_get_page_permalink('myaccount')); ?>" class="button pay"><?php esc_html_e('My account', 'materialis'); ?></a> 35 <?php endif; ?> 36 </p> 37 38 <?php else : ?> 39 40 <p class="woocommerce-notice woocommerce-notice--success woocommerce-thankyou-order-received"><?php echo apply_filters('woocommerce_thankyou_order_received_text', __('Thank you. Your order has been received.', 'materialis'), $order); ?></p> 41 42 <ul class="woocommerce-order-overview woocommerce-thankyou-order-details order_details"> 43 44 <li class="woocommerce-order-overview__order order"> 45 <?php esc_html_e('Order number:', 'materialis'); ?> 46 <strong><?php echo $order->get_order_number(); ?></strong> 47 </li> 48 49 <li class="woocommerce-order-overview__date date"> 50 <?php esc_html_e('Date:', 'materialis'); ?> 51 <strong><?php echo wc_format_datetime($order->get_date_created()); ?></strong> 52 </li> 53 54 <?php if (is_user_logged_in() && $order->get_user_id() === get_current_user_id() && $order->get_billing_email()) : ?> 55 <li class="woocommerce-order-overview_esc_html_email email"> 56 <?php esc_html_e('Email:', 'materialis'); ?> 57 <strong><?php echo $order->get_billing_email(); ?></strong> 58 </li> 59 <?php endif; ?> 60 61 <li class="woocommerce-order-overview__total total"> 62 <?php esc_html_e('Total:', 'materialis'); ?> 63 <strong><?php echo $order->get_formatted_order_total(); ?></strong> 64 </li> 65 66 <?php if ($order->get_payment_method_title()) : ?> 67 68 <li class="woocommerce-order-overview__payment-method method"> 69 <?php esc_html_e('Payment method:', 'materialis'); ?> 70 <strong><?php echo wp_kses_post($order->get_payment_method_title()); ?></strong> 71 </li> 72 73 <?php endif; ?> 74 75 </ul> 76 77 <?php endif; ?> 78 79 <div class="woocommerce-thank-you-wrapper"> 80 <div class="col-xs"> 81 <div class="woocommerce-payment-method"> 82 <?php do_action('woocommerce_thankyou_' . $order->get_payment_method(), $order->get_id()); ?> 83 </div> 84 </div> 85 86 <?php do_action('woocommerce_thankyou', $order->get_id()); ?> 87 </div> 88 <?php else : ?> 89 90 <p class="woocommerce-notice woocommerce-notice--success woocommerce-thankyou-order-received"><?php echo apply_filters('woocommerce_thankyou_order_received_text', __('Thank you. Your order has been received.', 'materialis'), null); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?></p> 91 92 <?php endif; ?> 93 94 </div>