Customer email in a checkout/order-received
-
We need to show the customer email detail in a thank you page that is displayed after order is make: https://www.iciam.it/checkout/order-received/39780/?key=wc_order_96df56sd5f6s5f6
This is because of the user-provided data required for measurement of the tag manager conversion.
Many Thanks
Attachments:
You must be
logged in to view attached files.
i solved with a snippet:
add_action( ‘woocommerce_thankyou’, ‘adding_customers_details_to_thankyou’, 10, 1 );
function adding_customers_details_to_thankyou( $order_id ) {
// Only for non logged in users
if ( ! $order_id ) return;
$order = wc_get_order($order_id); // Get an instance of the WC_Order object
wc_get_template( ‘order/order-details-customer.php’, array(‘order’ => $order ));
}
Hello,
Navigate to Theme Settings > Shop > ThankYou page > enable the option “Default “Thank you page” content”.
Best Regards.