Automattic / woocommerce-subscriptions-core

Subscriptions core package for WooCommerce
Other
85 stars 31 forks source link

Using the "Cancel and remove personal data" bulk action does not cancel the subscription on HPOS #376

Closed mattallan closed 1 year ago

mattallan commented 1 year ago

Describe the bug

In #367, we have addressed issues with bulk actions not working with HPOS enabled but while testing this PR I noticed the "Cancel and remove personal data" action wasn't cancelling the subscription.

With HPOS enabled, using this bulk action keeps the subscription status but still removes the data:

image

What's causing this is WooCommerce's new ListTable.php class is handling the remove_personal_data action here for both Orders and Subscriptions, however, we want our own WCS_Privacy to handle

To Reproduce

  1. With HPOS enabled, purchase a subscription
  2. From the WP admin navigate to WooCommerce > Subscriptions
  3. Select an active subscription and use the bulk action to "Cancel and remove personal data"
  4. Notice the subscriptions data has been anonymized but the subscription is still active

Expected behavior

Actual behavior

Product impact

Additional context