• Resolved themaincompany

    (@themaincompany)


    Hi,

    I’m trying to display product SKU on my shop. I’ve used the following code which I’ve tested on the individual product level by using ‘woocommerce_single_product_summary’ and it works. For some reason I cannot get it to work on categories. Any ideas why?

    add_action( ‘woocommerce_shop_loop_item_title’, ‘db_show_sku’, 6 );
    function db_show_sku(){
    global $product;
    echo ‘<span class=”custom_sku”>Part no. ‘ . $product->get_sku() . ‘</span>’;
    }

    The page I need help with: [log in to see the link]

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘Displaying SKU on WooCommece Categories’ is closed to new replies.