Hello Emanuela,
Thank you for the help. I didn’t know the meta “name” so to say, could not be found in the FAQ (sure looked trough it and also on the forum here).
This is my final code with with classes added to it:
// WooCommerce SKU and UPC under product title
add_action( 'woocommerce_single_product_summary', 'dev_designs_show_sku', 10 );
function dev_designs_show_sku(){
global $product;
echo '<div class="sku_under_title">SKU:' . $product->get_sku() . '</div>';
}
add_action( 'woocommerce_single_product_summary', 'dev_designs_show_upc', 10 );
function dev_designs_show_upc(){
global $product;
echo '<div class="upc_under_title">UPC:' . $product->get_meta( '_wpm_gtin_code' ) . '</div>';
}
Again, thank you so much for your help!