Woocommerce digital download not working – database error Cannot add or update a child row: a foreign key constraint fails [closed]

Just go to your database, drop table ending with “wc_download_log” (it might have a prefix).
After droping the table deactivate Woocommerce and activate it again.

That will solve the trick. Just be careful, drop just that table, be sure to back things up first.

This post helped me solved this: https://wordpress.org/support/topic/unable-to-insert-download-log-entry-in-database/page/2/#post-13359528