Open sisaacrussell opened 6 months ago
Sorry about that. It should be fixed now, 2.4.1 and on WordPress.org.
When I said yesterday I had been trying to get more E2E tests running, it was actually the WooCommerce E2E suite I tried and failed to have run. Ideally that would have picked up the issue, so I'll definitely continue to work on that.
I think you're right that it's HPOS related because I had manually created an order while testing and hadn't encountered the bug.
The private uploads library is really just used here to protect the log files, but elsewhere it's used to upload files in the UI, e.g. to attach photos to orders, shipping labels to orders. By habit, I just add all hooks and then inside the functions I return early if they're not relevant, but I'll move the check to occur before the hook is added in future.
Bug Report
Describe the current, buggy behavior
Viewing a WooCommerce order in the admin with HPOS enabled throws a fatal error:
Describe how other contributors can replicate this bug
https://developer.woocommerce.com/docs/hpos-extension-recipe-book/#h-apis-for-getting-setting-posts-and-postmeta this will likely be helpful though I'm sure you're familiar with it. For the short run, in my copy, I disabled this metabox functionality entirely (not sure what it's doing for custom uploads related to this plugin).