liquidweb / woocommerce-custom-orders-table

Store WooCommerce order data in a custom table for improved performance.
GNU General Public License v3.0
476 stars 51 forks source link

Question: Orders still being generated in posts table #173

Closed barney-milexa closed 4 years ago

barney-milexa commented 4 years ago

Describe the bug Just installing it on a large scale website with custom order process (still using almost all of WooCommerce's functionality). I'm still seeing orders being created in the posts table, is this expected behaviour? This secondary table is just the collation of actual order information in a more 'containered' fashion. I'm guessing on a vanilla Wordpress installation we'd still see the same thing where orders are created in posts but also aggregated into the new order table.

Additional context It's not a problem more a confirmation of the functionality to ensure we haven't got something going on that we shouldn't have. Really appreciate you open sourcing something like this!

stevegrunwell commented 4 years ago

Hi @barney-milexa,

Orders will still be treated as posts within WordPress (since everything in WordPress revolves around the wp_posts table), but all of the stock order meta gets stored in the custom table (as opposed to wp_postmeta). As a result, creating a new order involves two writes (the posts table and the orders table) instead of ~40 (posts table and a ton of entries in the postmeta table).

Thanks for reaching out and using the plugin. Don't worry, there will be updates coming soon 😉

barney-milexa commented 4 years ago

Hero! Thanks for getting back so quickly, really appreciate it.