Hi Mike,
Thanks for reaching to us.
Please add below code to functions.php file in Child theme
if ( ! function_exists( 'woodmart_output_sku_in_thank_you_page' ) ) {
/**
* Show SKU on thank you page.
*
* @param int $item_id Item ID.
* @param object $item Product item.
* @param object $order Order.
*/
function woodmart_output_sku_in_thank_you_page( $item_id, $item, $order ) {
if ( ! woodmart_get_opt( 'show_sku_in_thank_you_page' ) ) {
return;
}
$product_id = $item->get_variation_id() ? $item->get_variation_id() : $item->get_product_id();
$product = wc_get_product( $product_id );
$sku = $product->get_sku();
if ( ! $sku ) {
return;
}
?>
<div class="wd-product-sku">
<span class="wd-label">
<?php echo esc_html__( 'SKU:', 'woodmart' ); ?>
</span>
<span>
<?php echo esc_html( $sku ); ?>
</span>
</div>
<?php
}
add_action( 'woocommerce_order_item_meta_start', 'woodmart_output_sku_in_thank_you_page', 10, 3 );
}
Regards,