-
Notifications
You must be signed in to change notification settings - Fork 51
Consideration for this separate table being used as read-only "posting" table #4
Comments
@lukecav Cheers, familiar with those, thank you kindly. |
Do I need any script to migrate the orders there? |
There is WP-CLI support for order migration. |
I think the concept of "warehousing" completed orders (perhaps after being complete X days, in case of returns, cancellations, etc.) is a fantastic idea, but it feels like that's better served as a separate plugin, especially given the "maybe this'll make it into WooCommerce core" nature of WooCommerce Custom Orders Table. Some sites may benefit from storing it in the database (in a rarely-accessed table), while others may want to download the data and completely remove it from their database. A WP-Cron job (or, better yet, a WP-CLI command that can be run on a proper system cron) would probably be a better way to handle this, regardless of whether or not a site is using the custom orders table or default post meta handling. ^ Free plugin idea 😉. |
Just getting to this area of a project ourselves and will do some testing but I wonder if you would consider the use of the separate custom table as a read-only accounts posting table?
Given the nature of this being a plugin, it would make for a natural extension for large-scale users only - that didn't lose backward compatibility with other plugins already referring to the existing post tables.
One would also expect that use of this plugin would then only be entertained by those absolutely needing this and mostly likely the resources to work on their other plugin compatibilities.
So - "Open" orders would remain in post tables and "Completed" orders would be archived to this separate orders table - therefore incorporation accounting principles for open and complete contractual statuses by design.
This then meets the aim of keeping the posts tables lighter and faster to query for reporting and analytics but also means that a reliance on plugins hardwired to posts can remain simply by having the ability to re-open an order - sending it back to the posts table if it needs working on or some other interaction.
The text was updated successfully, but these errors were encountered: