Automattic / woocommerce-subscriptions-core

Subscriptions core package for WooCommerce
Other
88 stars 33 forks source link

[HPOS] Fixes the quick-edit subscription status links on the admin list table when running WC 8.1+ #531

Closed mattallan closed 11 months ago

mattallan commented 11 months ago

Fixes https://github.com/woocommerce/woocommerce-subscriptions/issues/4573

Description

WooCommerce 8.1 (https://github.com/woocommerce/woocommerce/pull/39524) introduced a change to the way they fetch order/subscription IDs from the ListTable bulk-edit request and instead of using $REQUEST['order'], they now use $REQUEST['id']. This broke the bulk-edit and quick-edit features on the subscriptions admin list table i.e. these links:

image

If you install WC 8.1 and have HPOS enabled, these links no longer work.

How to test this PR

  1. Install WC 8.1+ and make sure HPOS is enabled.
  2. Navigate to the the WooCommerce > Subscriptions list table.
  3. Try to suspend a subscription using the quick links.
  4. On trunk notice the subscription doesn't update
  5. On this branch the subscription is updated.
  6. Test the bulk actions drop-down continues to work

Product impact

mattallan commented 11 months ago

My own testing: