Woocommerce – Get SKU in product single page?

How to get the SKU in my product single pages in Woocommerce?

Joan Powell Asked on November 27, 2015 in WordPress.
Add Comment
1 Answer(s)
Best answer

The following code should get the SKU:

<?php echo $product->get_sku(); ?>

If you do not have a reference to the product you should add the following line at the top of the file:

global $product;

John Rogers Answered on November 27, 2015.
Add Comment

Your Answer

By posting your answer, you agree to the privacy policy and terms of service.