A new GDPR-compliant feature is now available in your WooCommerce setting (WooCommerce > Settings > Conversio tab).
The opt-in checkbox will appear below the email address input during checkout, like this (depending on your theme, this may look different)
Only customers who have not previously opted in will see this.
If you sell to customers within the EU (even if your business isn't in the EU), you will need to ensure that "By default, customers does not agree to receive marketing emails".
Anyone who checks the box will be subscribed to the "Accepted Marketing" list which you will find in Subscribers > Segments & Lists > Your Lists.