This plugins makes that super easy, it’s lightweight and fully integrated with your current WooCommerce experience.
The WooCommerce Product Batch Numbers plugin download is a small extension that enables you to manage batch numbers or lot numbers at a product and order level inside WooCommerce. It supports both simple and variable products, allowing you to track those numbers easily in terms of expiration date, supplier and availability.