How can we debug or reproduce the following problem:
We noticed that the tax_class_id of almost all products (96%) get reset to 0 so we mass updated the tax class of the products back to normal. The next day it was reset to 0 again. We started monitoring the attribute value with the following query:
where value = 0
and store_id = 0
and attribute_id = (select attribute_id from eav_attribute where attribute_code = 'tax_class_id')
Due to the monitoring we figured out that this reset starts at 02:00 AM and continues for 3 hours until almost all products tax class is set to 0.
This behavior occurs on our testing instance as well at the same time but less products are affected (20%).
What we did so far:
Our first thought was that it might be a cronjob that is causing the problem because it occurs every day at the exact same time. So I checked cronjobs running on the server but we only have the Magento cronjobs running and of them no one runs at 02:00 AM.
We thought it might be due to our import via the rest api but we have a rest logging active and this is not affecting it. On the import the correct tax_class_id is pushed to Magento and Magento returns the correct value. As well the import runs later.
We thought maybe someone acquired access to the admin backend or server so we checked our access logs but there are no abnormalities.
I checked the Magento logs but I didn't find anything that could lead to a clue.
I checked our custom modules whether we overwrite the tax_class_id somewhere but we don't.
Is there any way to debug this behavior?