2014-08-19

WooCommerce: SQL to fix sorting by date

In one of the projects, I needed to import a product data from a non-WP website to WooCommerce.

After importing, the "Sort by newness" did not work correctly, because the post dates were all the same.

A simple SQL solved my problem: