File: /var/www/kevin-demo/wp-content/themes/fitmencook/woocommerce/checkout/thankyou.php
<?php
/**
* Thankyou page
*
* This template can be overridden by copying it to yourtheme/woocommerce/checkout/thankyou.php.
*
* HOWEVER, on occasion WooCommerce will need to update template files and you
* (the theme developer) will need to copy the new files to your theme to
* maintain compatibility. We try to do this as little as possible, but it does
* happen. When this occurs the version of the template file will be bumped and
* the readme will list any important changes.
*
* @see https://woocommerce.com/document/template-structure/
* @package WooCommerce\Templates
* @version 8.1.0
*
* @var WC_Order $order
*/
defined( 'ABSPATH' ) || exit;
?>
<div class="woocommerce-order fmc-order-confirmation">
<?php
if ( $order ) :
do_action( 'woocommerce_before_thankyou', $order->get_id() );
if ( $order->has_status( 'failed' ) ) :
?>
<div class="fmc-order-confirmation__content fmc-order-confirmation__content--failed">
<div class="fmc-order-confirmation__icon fmc-order-confirmation__icon--error" aria-hidden="true">
<span>!</span>
</div>
<h1 class="fmc-order-confirmation__title"><?php esc_html_e( 'Payment failed', 'fitmencook' ); ?></h1>
<p class="fmc-order-confirmation__subtitle"><?php esc_html_e( 'Unfortunately, the payment was declined. Please try again or choose a different method.', 'fitmencook' ); ?></p>
<div class="fmc-order-confirmation__actions">
<a href="<?php echo esc_url( $order->get_checkout_payment_url() ); ?>" class="button pay"><?php esc_html_e( 'Try again', 'fitmencook' ); ?></a>
<?php if ( is_user_logged_in() ) : ?>
<a class="button alt" href="<?php echo esc_url( wc_get_page_permalink( 'myaccount' ) ); ?>"><?php esc_html_e( 'My account', 'fitmencook' ); ?></a>
<?php endif; ?>
</div>
</div>
<?php
else :
?>
<div class="fmc-order-confirmation__content">
<div class="fmc-order-confirmation__icon" aria-hidden="true">
<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100" viewBox="0 0 100 100" fill="none">
<circle cx="50" cy="50" r="50" fill="#32D583"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M70.1213 35.8787C71.2929 37.0503 71.2929 38.9497 70.1213 40.1213L46.1213 64.1213C44.9497 65.2929 43.0503 65.2929 41.8787 64.1213L29.8787 52.1213C28.7071 50.9497 28.7071 49.0503 29.8787 47.8787C31.0503 46.7071 32.9497 46.7071 34.1213 47.8787L44 57.7574L65.8787 35.8787C67.0503 34.7071 68.9497 34.7071 70.1213 35.8787Z" fill="white"/>
</svg>
</div>
<h1 class="fmc-order-confirmation__title"><?php esc_html_e( 'Thank you for the order!', 'fitmencook' ); ?></h1>
<p class="fmc-order-confirmation__subtitle">
<?php
/* translators: %s: customer email */
echo wp_kses_post(
sprintf(
__( 'The order confirmation has been sent to %s', 'fitmencook' ),
$order->get_billing_email() ? '<strong>' . esc_html( $order->get_billing_email() ) . '</strong>' : esc_html__( 'your email address', 'fitmencook' )
)
);
?>
</p>
<div class="fmc-order-confirmation__actions">
<a class="fmc_btn_2 fmc_b_m" href="/"><span class="btn_text">Go To Homepage</span><span class="btn_icon"><svg width="12" height="10" viewBox="0 0 12 10" fill="none" xmlns="https://www.w3.org/2000/svg">
<path fill-rule="evenodd" clip-rule="evenodd" d="M6.29289 0.292893C6.68342 -0.097631 7.31658 -0.0976311 7.70711 0.292893L11.7071 4.29289C12.0976 4.68342 12.0976 5.31658 11.7071 5.70711L7.70711 9.70711C7.31658 10.0976 6.68342 10.0976 6.29289 9.70711C5.90237 9.31658 5.90237 8.68342 6.29289 8.29289L8.58579 6L1 6C0.447716 6 -2.41411e-08 5.55228 0 5C2.41411e-08 4.44772 0.447716 4 1 4H8.58579L6.29289 1.70711C5.90237 1.31658 5.90237 0.683418 6.29289 0.292893Z" fill="#98A2B3"></path>
</svg>
</span>
</a>
</div>
</div>
<?php
endif;
else :
?>
<div class="fmc-order-confirmation__content">
<div class="fmc-order-confirmation__icon" aria-hidden="true">
<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100" viewBox="0 0 100 100" fill="none">
<circle cx="50" cy="50" r="50" fill="#32D583"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M70.1213 35.8787C71.2929 37.0503 71.2929 38.9497 70.1213 40.1213L46.1213 64.1213C44.9497 65.2929 43.0503 65.2929 41.8787 64.1213L29.8787 52.1213C28.7071 50.9497 28.7071 49.0503 29.8787 47.8787C31.0503 46.7071 32.9497 46.7071 34.1213 47.8787L44 57.7574L65.8787 35.8787C67.0503 34.7071 68.9497 34.7071 70.1213 35.8787Z" fill="white"/>
</svg>
</div>
<h1 class="fmc-order-confirmation__title"><?php esc_html_e( 'Thank you for the order!', 'fitmencook' ); ?></h1>
<p class="fmc-order-confirmation__subtitle"><?php esc_html_e( 'The order confirmation has been sent to your email address.', 'fitmencook' ); ?></p>
<div class="fmc-order-confirmation__actions">
<a class="fmc_btn_2 fmc_b_m" href="/"><span class="btn_text">Go To Homepage</span><span class="btn_icon"><svg width="12" height="10" viewBox="0 0 12 10" fill="none" xmlns="https://www.w3.org/2000/svg">
<path fill-rule="evenodd" clip-rule="evenodd" d="M6.29289 0.292893C6.68342 -0.097631 7.31658 -0.0976311 7.70711 0.292893L11.7071 4.29289C12.0976 4.68342 12.0976 5.31658 11.7071 5.70711L7.70711 9.70711C7.31658 10.0976 6.68342 10.0976 6.29289 9.70711C5.90237 9.31658 5.90237 8.68342 6.29289 8.29289L8.58579 6L1 6C0.447716 6 -2.41411e-08 5.55228 0 5C2.41411e-08 4.44772 0.447716 4 1 4H8.58579L6.29289 1.70711C5.90237 1.31658 5.90237 0.683418 6.29289 0.292893Z" fill="#98A2B3"></path>
</svg>
</span>
</a>
</div>
</div>
<?php endif; ?>
</div>