N
N
NotLogo2014-09-03 18:48:55
Electronic commerce
NotLogo, 2014-09-03 18:48:55

How to display product SKU on Woocommerce category page?

Good afternoon, tell me how to display the SKUs of goods on the page for issuing category goods?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
N
NotLogo, 2014-09-04
@NotLogo

Resolved the issue:

add_action( 'woocommerce_after_shop_loop_item_title', 'shop_sku' );
function shop_sku(){
global $product;
echo '<span itemprop="productID" class="sku">SKU: ' . $product->sku . '</span>';
}

we make it as a plugin or add it to functions.php

A
Alexander Zelenin, 2014-09-04
@zelenin

edit template

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question