How to add SKU on Product Detail Page

To add SKU on Product Detail Page, like this.

#2. Click Advanced > Page Header Code Injection

#3. Use this code to right box

If you need to add SKU on Store Page, or add for Variant options, you can message me.

<script>document.addEventListener('DOMContentLoaded',function(){const productPrice=document.querySelector('.product-price');if(productPrice){const currentUrl=window.location.pathname;fetch(currentUrl+'?format=json-pretty').then(response=>response.json()).then(data=>{const sku=data.item.structuredContent.variants[0].sku;const skuDiv=document.createElement('div');skuDiv.className='product-sku';skuDiv.innerHTML='<b>SKU:</b> '+sku;productPrice.appendChild(skuDiv)}).catch(error=>console.error('Error:',error))}});</script>