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

Question

I’m having an issue when trying to download a digital product from Woocommerce. When clicking the download link/button on thank you page or woocommerce email, the link shows an error.

After going to the PHP Error logs I found this:
WordPress database error Cannot add or update a child row: a foreign key constraint fails. CONSTRAINT fk_wc_download_log_permission_id FOREIGN KEY (permission_id)

REFERENCES wpdev_woocommerce_downloadable_product_permissions (permission_id) for query INSERT INTOwp01_wc_download_log`

How can I solve this?

0
danielsalare 3 months 0 Answers 53 views 0

Leave an answer