In some cases you might need to customize the success page and/or the email confirmation page that goes to the customer.
To edit the Confirmation email page:
In WP Dashboard
- Go to WooCommerce >>> Settings >>> Emails
- Go to Processing Order >>> Manage
- Copy File to Template
In Hosting Control Panel of Server
- Go to WPContent >>> Themes>>> NameofTheme >>>
- Go to woocommerce >>> emails
- Open file “customer-processing-order.php” using the edit pencil
- Go to the file location in file and add your html edit/addition (see below)
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://docs.woocommerce.com/document/template-structure/
* @package WooCommerce/Templates/Emails
* @version 3.5.4
*/
* (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://docs.woocommerce.com/document/template-structure/
* @package WooCommerce/Templates/Emails
* @version 3.5.4
*/
if ( ! defined( ‘ABSPATH’ ) ) {
exit;
}
exit;
}
/*
* @hooked WC_Emails::email_header() Output the email header
*/
do_action( ‘woocommerce_email_header’, $email_heading, $email ); ?>
* @hooked WC_Emails::email_header() Output the email header
*/
do_action( ‘woocommerce_email_header’, $email_heading, $email ); ?>
<?php /* translators: %s: Customer first name */ ?>
<p><?php printf( esc_html__( ‘Hi %s,’, ‘woocommerce’ ), esc_html( $order->get_billing_first_name() ) ); ?></p>
<?php /* translators: %s: Order number */ ?>
<p><?php printf( esc_html__( ‘Just to let you know — we\’ve received your order #%s, and it is now being processed. If you have ordered one of our service packages, go to https://yourdomain.com/appointment-calendar to schedule your appointment.:’, ‘woocommerce’ ), esc_html( $order->get_order_number() ) ); ?></p>
<p><?php printf( esc_html__( ‘Hi %s,’, ‘woocommerce’ ), esc_html( $order->get_billing_first_name() ) ); ?></p>
<?php /* translators: %s: Order number */ ?>
<p><?php printf( esc_html__( ‘Just to let you know — we\’ve received your order #%s, and it is now being processed. If you have ordered one of our service packages, go to https://yourdomain.com/appointment-calendar to schedule your appointment.:’, ‘woocommerce’ ), esc_html( $order->get_order_number() ) ); ?></p>
To edit the Success page
Go to Control Panel of Server
- Go to Content >>>Plugins >>> WooCommerce >>> Templates >>> Checkout
- Open file “ThankYou.php” using edit pencil
- Go to the follow location in the file and add your html edit/addition (see below)
<div class=”woocommerce-order”>
<?php if ( $order ) : ?>
<?php if ( $order->has_status( ‘failed’ ) ) : ?>
<p class=”woocommerce-notice woocommerce-notice–error woocommerce-thankyou-order-failed”><?php _e( ‘Unfortunately your order cannot be processed as the originating bank/merchant has declined your transaction. Please attempt your purchase again.’, ‘woocommerce’ ); ?></p>
<p class=”woocommerce-notice woocommerce-notice–error woocommerce-thankyou-order-failed-actions”>
<a href=”<?php echo esc_url( $order->get_checkout_payment_url() ); ?>” class=”button pay”><?php _e( ‘Pay’, ‘woocommerce’ ) ?></a>
<?php if ( is_user_logged_in() ) : ?>
<a href=”<?php echo esc_url( wc_get_page_permalink( ‘myaccount’ ) ); ?>” class=”button pay”><?php _e( ‘My account’, ‘woocommerce’ ); ?></a>
<?php endif; ?>
</p>
<a href=”<?php echo esc_url( $order->get_checkout_payment_url() ); ?>” class=”button pay”><?php _e( ‘Pay’, ‘woocommerce’ ) ?></a>
<?php if ( is_user_logged_in() ) : ?>
<a href=”<?php echo esc_url( wc_get_page_permalink( ‘myaccount’ ) ); ?>” class=”button pay”><?php _e( ‘My account’, ‘woocommerce’ ); ?></a>
<?php endif; ?>
</p>
<?php else : ?>
<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. <br><strong>If you have ordered one of our service packages, <span style=”color: #ff0000;”><a style=”color: #ff0000;” href=”https://yourdomain.com/appointment-calendar/”>click here</a></span> to schedule your appointment.</strong>’, ‘woocommerce’ ), $order ); ?></p>