Sudden 404 pages on product category archives

For no apparent reasons, wordpress is returning 404 error on pages that were working fine. Affected pages are product category archive pages. They are a mixture of custom and default pages.

The directory structures that are affected

Steps already taken

How can I fix it?