Why is Woocommerce writing in my wp_comment table?

Oh, that is double offtopic, but for the sake of helping other people which might wonder the same about EDD and maybe other plugins, the reason is because wordpress core to not have any easy support for hierarchy between CPTs except for comments being under posts. As orders are “belonging” to specific products it makes a simple hack to emulate such a relationship by using comments.

Why not just store order in separate table? because on wordpress.com which is one of the biggest wordpress hosters in the world plugins are not allowed to create new table, therefor WC and EDD had to come up with some hack.

What should you do? probably nothing, why do you even look at the DB in the first place? Checking out the architecture of code is something you should do before putting it on production. After it was running for a while it becomes too late to think about alternatives.

Leave a Comment