Home Forums Basel support forum SKU instead of price Reply To: SKU instead of price

#26458

Artem Temos
Keymaster

Hi,

Try to replace with this code

add_action( 'woocommerce_shop_loop_item_title', 'custom_before_title', 20 );
function custom_before_title() {

    global $product;

    if ( $product->get_sku() ) {
        echo '<span class="product-grid-sku"><span>SKU - </span>' . $product->get_sku() . '</span>';
    }

}