Skip to content
This repository has been archived by the owner on Jun 15, 2022. It is now read-only.

Consideration for this separate table being used as read-only "posting" table #4

Closed
marcusquinn opened this issue Oct 27, 2017 · 5 comments

Comments

@marcusquinn
Copy link

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.

@marcusquinn
Copy link
Author

@lukecav Cheers, familiar with those, thank you kindly.

@kevin25
Copy link

kevin25 commented Nov 3, 2017

Do I need any script to migrate the orders there?

@lukecav
Copy link
Member

lukecav commented Nov 4, 2017

There is WP-CLI support for order migration.

stevegrunwell pushed a commit that referenced this issue May 23, 2018
@stevegrunwell
Copy link
Contributor

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 😉.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants