cart-errors.php
5 years ago
form-billing.php
5 years ago
form-checkout.php
5 years ago
form-coupon.php
5 years ago
form-login.php
5 years ago
form-pay.php
5 years ago
form-shipping.php
5 years ago
order-receipt.php
5 years ago
payment-method.php
5 years ago
payment.php
5 years ago
review-order.php
5 years ago
terms.php
5 years ago
thankyou.php
5 years ago
thankyou.php
89 lines
| 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 |
| 24 | if ( $order ) : |
| 25 | |
| 26 | do_action( 'woocommerce_before_thankyou', $order->get_id() ); |
| 27 | ?> |
| 28 | |
| 29 | <?php if ( $order->has_status( 'failed' ) ) : ?> |
| 30 | |
| 31 | <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.', 'woocommerce' ); ?></p> |
| 32 | |
| 33 | <p class="woocommerce-notice woocommerce-notice--error woocommerce-thankyou-order-failed-actions"> |
| 34 | <a href="<?php echo esc_url( $order->get_checkout_payment_url() ); ?>" class="button pay"><?php esc_html_e( 'Pay', 'woocommerce' ); ?></a> |
| 35 | <?php if ( is_user_logged_in() ) : ?> |
| 36 | <a href="<?php echo esc_url( wc_get_page_permalink( 'myaccount' ) ); ?>" class="button pay"><?php esc_html_e( 'My account', 'woocommerce' ); ?></a> |
| 37 | <?php endif; ?> |
| 38 | </p> |
| 39 | |
| 40 | <?php else : ?> |
| 41 | |
| 42 | <p class="woocommerce-notice woocommerce-notice--success woocommerce-thankyou-order-received"><?php echo apply_filters( 'woocommerce_thankyou_order_received_text', esc_html__( 'Thank you. Your order has been received.', 'woocommerce' ), $order ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?></p> |
| 43 | |
| 44 | <ul class="woocommerce-order-overview woocommerce-thankyou-order-details order_details"> |
| 45 | |
| 46 | <li class="woocommerce-order-overview__order order"> |
| 47 | <?php esc_html_e( 'Order number:', 'woocommerce' ); ?> |
| 48 | <strong><?php echo $order->get_order_number(); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?></strong> |
| 49 | </li> |
| 50 | |
| 51 | <li class="woocommerce-order-overview__date date"> |
| 52 | <?php esc_html_e( 'Date:', 'woocommerce' ); ?> |
| 53 | <strong><?php echo wc_format_datetime( $order->get_date_created() ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?></strong> |
| 54 | </li> |
| 55 | |
| 56 | <?php if ( is_user_logged_in() && $order->get_user_id() === get_current_user_id() && $order->get_billing_email() ) : ?> |
| 57 | <li class="woocommerce-order-overview__email email"> |
| 58 | <?php esc_html_e( 'Email:', 'woocommerce' ); ?> |
| 59 | <strong><?php echo $order->get_billing_email(); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?></strong> |
| 60 | </li> |
| 61 | <?php endif; ?> |
| 62 | |
| 63 | <li class="woocommerce-order-overview__total total"> |
| 64 | <?php esc_html_e( 'Total:', 'woocommerce' ); ?> |
| 65 | <strong><?php echo $order->get_formatted_order_total(); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?></strong> |
| 66 | </li> |
| 67 | |
| 68 | <?php if ( $order->get_payment_method_title() ) : ?> |
| 69 | <li class="woocommerce-order-overview__payment-method method"> |
| 70 | <?php esc_html_e( 'Payment method:', 'woocommerce' ); ?> |
| 71 | <strong><?php echo wp_kses_post( $order->get_payment_method_title() ); ?></strong> |
| 72 | </li> |
| 73 | <?php endif; ?> |
| 74 | |
| 75 | </ul> |
| 76 | |
| 77 | <?php endif; ?> |
| 78 | |
| 79 | <?php do_action( 'woocommerce_thankyou_' . $order->get_payment_method(), $order->get_id() ); ?> |
| 80 | <?php do_action( 'woocommerce_thankyou', $order->get_id() ); ?> |
| 81 | |
| 82 | <?php else : ?> |
| 83 | |
| 84 | <p class="woocommerce-notice woocommerce-notice--success woocommerce-thankyou-order-received"><?php echo apply_filters( 'woocommerce_thankyou_order_received_text', esc_html__( 'Thank you. Your order has been received.', 'woocommerce' ), null ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?></p> |
| 85 | |
| 86 | <?php endif; ?> |
| 87 | |
| 88 | </div> |
| 89 |