The following PHP notice appears in the logs when taking a parent order out of trash, and HPOS is enabled.
PHP Notice: Undefined index: new in /var/www/html/wp-content/plugins/woocommerce-subscriptions-core/includes/class-wcs-object-data-cache-manager-many-to-one.php on line 36
To Reproduce
Go to WooCommerce -> Settings -> Advanced -> Features. /wp-admin/admin.php?page=wc-settings&tab=advanced§ion=features
Under Experimental features, select "High performance order storage (new)", enable "Keep the posts and orders tables in sync (compatibility mode)", and save
As a shopper, purchase a subscription
As an admin, go to WooCommerce -> Orders
Move the Parent order for the subscription you just purchased to trash
Go to trash
Restore the Parent order you just moved to trash
Notice the PHP notice (ha!) in the debug.log file
PHP Notice: Undefined index: new in /var/www/html/wp-content/plugins/woocommerce-subscriptions-core/includes/class-wcs-object-data-cache-manager-many-to-one.php on line 36
Expected behavior
Untrashing an order shouldn't trigger a PHP notice.
Actual behavior
Untrashing an order triggers a PHP notice.
Product impact
[ ] Does this issue affect WooCommerce Subscriptions? yes/no/tbc, add issue ref
[ ] Does this issue affect WooCommerce Payments? yes/no/tbc, add issue ref
Describe the bug
The following PHP notice appears in the logs when taking a parent order out of trash, and HPOS is enabled.
To Reproduce
/wp-admin/admin.php?page=wc-settings&tab=advanced§ion=features
Expected behavior
Untrashing an order shouldn't trigger a PHP notice.
Actual behavior
Untrashing an order triggers a PHP notice.
Product impact
Additional context