Add SKU to Product Archive Loop

// ---------- Add SKU tp product archive loop
function atkinson_shop_display_skus() {
    global $product;
    if ( $product->get_sku() ) {
        echo '<div class="sku-archive">SKU: ' . $product->get_sku() . '</div>';
    }
}
add_action( 'woocommerce_after_shop_loop_item', 'atkinson_shop_display_skus', 9 );
No Comments

Sorry, the comment form is closed at this time.