Duplicate Orders in WooCommerce
The Codisto WooCommerce plugin is developed to prevent duplication of orders by using a database transaction to commit order data. This approach works 100% reliably when the database supports transactions.
Most WordPress installations are backed by MySQL databases, which can be supported by different storage engines. Not all of those database engines are transactional. The MyISAM storage engine is not transactional (see Transaction Commit and Rollback Support MyISAM). As a result, it is possible to get inconsistent data regardless of the code to commit that data being written to avoid inconsistencies.
If your WordPress database uses MyISAM, it should be changed to InnoDB, which is transactional. A guide at Convert MyISAM to InnoDB describes how to do this.