woocommerce/templates/checkout/thankyou.php

70 lines
2.2 KiB
PHP
Raw Normal View History

<?php
/**
2012-08-14 18:05:45 +00:00
* Thankyou page
*
* @author WooThemes
* @package WooCommerce/Templates
2014-05-30 16:43:21 +00:00
* @version 2.2.0
*/
2012-08-14 18:05:45 +00:00
if ( ! defined( 'ABSPATH' ) ) {
exit; // Exit if accessed directly
}
2012-08-14 18:05:45 +00:00
2013-01-02 12:59:36 +00:00
if ( $order ) : ?>
2014-06-03 09:45:33 +00:00
<?php if ( $order->has_status( 'failed' ) ) : ?>
2012-08-14 18:05:45 +00:00
2012-10-16 09:45:33 +00:00
<p><?php _e( 'Unfortunately your order cannot be processed as the originating bank/merchant has declined your transaction.', 'woocommerce' ); ?></p>
<p><?php
2013-01-02 12:59:36 +00:00
if ( is_user_logged_in() )
2012-10-16 09:45:33 +00:00
_e( 'Please attempt your purchase again or go to your account page.', 'woocommerce' );
2013-01-02 12:59:36 +00:00
else
2012-10-16 09:45:33 +00:00
_e( 'Please attempt your purchase again.', 'woocommerce' );
?></p>
2012-08-14 18:05:45 +00:00
<p>
2012-10-16 09:45:33 +00:00
<a href="<?php echo esc_url( $order->get_checkout_payment_url() ); ?>" class="button pay"><?php _e( 'Pay', 'woocommerce' ) ?></a>
2013-01-02 12:59:36 +00:00
<?php if ( is_user_logged_in() ) : ?>
<a href="<?php echo esc_url( get_permalink( wc_get_page_id( 'myaccount' ) ) ); ?>" class="button pay"><?php _e( 'My Account', 'woocommerce' ); ?></a>
<?php endif; ?>
</p>
<?php else : ?>
2012-08-14 18:05:45 +00:00
<p><?php echo apply_filters( 'woocommerce_thankyou_order_received_text', __( 'Thank you. Your order has been received.', 'woocommerce' ), $order ); ?></p>
2012-08-14 18:05:45 +00:00
<ul class="order_details">
<li class="order">
2012-10-16 09:45:33 +00:00
<?php _e( 'Order:', 'woocommerce' ); ?>
<strong><?php echo $order->get_order_number(); ?></strong>
</li>
<li class="date">
2012-10-16 09:45:33 +00:00
<?php _e( 'Date:', 'woocommerce' ); ?>
2013-01-02 12:59:36 +00:00
<strong><?php echo date_i18n( get_option( 'date_format' ), strtotime( $order->order_date ) ); ?></strong>
</li>
<li class="total">
2012-10-16 09:45:33 +00:00
<?php _e( 'Total:', 'woocommerce' ); ?>
<strong><?php echo $order->get_formatted_order_total(); ?></strong>
</li>
2013-01-02 12:59:36 +00:00
<?php if ( $order->payment_method_title ) : ?>
<li class="method">
2012-10-16 09:45:33 +00:00
<?php _e( 'Payment method:', 'woocommerce' ); ?>
2013-01-02 12:59:36 +00:00
<strong><?php echo $order->payment_method_title; ?></strong>
</li>
2012-03-05 13:25:02 +00:00
<?php endif; ?>
</ul>
<div class="clear"></div>
2012-08-14 18:05:45 +00:00
<?php endif; ?>
2012-08-14 18:05:45 +00:00
<?php do_action( 'woocommerce_thankyou_' . $order->payment_method, $order->id ); ?>
<?php do_action( 'woocommerce_thankyou', $order->id ); ?>
<?php else : ?>
2012-08-14 18:05:45 +00:00
<p><?php echo apply_filters( 'woocommerce_thankyou_order_received_text', __( 'Thank you. Your order has been received.', 'woocommerce' ), null ); ?></p>
2012-08-14 18:05:45 +00:00
<?php endif; ?>