Easy Digital Downloads has a “Disable Guest Checkout” option which when enabled, forces customers to create an account before they can make a purchase.
On the AffiliateWP website, we only wanted customers to be forced to create an account when they purchased a developer license. Creating an account for either the personal or business license should be optional.
Copy and paste the function below (mind the opening PHP tag) into your child theme’s functions.php or custom plugin. Modify the download ID and price ID accordingly.