| 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 |
use JupiterX_Core\sellkit\Modules\Order_Details\Module; |
| 19 |
|
| 20 |
defined( 'ABSPATH' ) || exit; |
| 21 |
|
| 22 |
?> |
| 23 |
|
| 24 |
<div class="woocommerce-order"> |
| 25 |
|
| 26 |
<?php |
| 27 |
if ( $order ) { |
| 28 |
|
| 29 |
do_action( 'woocommerce_before_thankyou', $order->get_id() ); |
| 30 |
} |
| 31 |
?> |
| 32 |
|
| 33 |
<?php if ( $order && $order->has_status( 'failed' ) ) : ?> |
| 34 |
|
| 35 |
<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> |
| 36 |
|
| 37 |
<p class="woocommerce-notice woocommerce-notice--error woocommerce-thankyou-order-failed-actions"> |
| 38 |
<a href="<?php echo esc_url( $order->get_checkout_payment_url() ); ?>" class="button pay"><?php esc_html_e( 'Pay', 'woocommerce' ); ?></a> |
| 39 |
<?php if ( is_user_logged_in() ) : ?> |
| 40 |
<a href="<?php echo esc_url( wc_get_page_permalink( 'myaccount' ) ); ?>" class="button pay"><?php esc_html_e( 'My account', 'woocommerce' ); ?></a> |
| 41 |
<?php endif; ?> |
| 42 |
</p> |
| 43 |
|
| 44 |
<?php else : ?> |
| 45 |
|
| 46 |
<ul <?php echo $this->get_render_attribute_string( 'details-order-content' ); ?> > |
| 47 |
<?php |
| 48 |
foreach ( $fields as $field ) { |
| 49 |
Sellkit_Elementor_Order_Details_Module::render_field( $this, $field ); |
| 50 |
} |
| 51 |
?> |
| 52 |
</ul> |
| 53 |
|
| 54 |
<?php endif; ?> |
| 55 |
|
| 56 |
|
| 57 |
</div> |
| 58 |
|