wpdb->insert creates duplicate rows
We had a similar problem here. The reason was that when loading a page in the frontend, WordPress actually was doing two requests: One to load the page A second one in the background after the page was loaded using admin-ajax.php The solution was to make sure, out function was only executed during the “normal” … Read more