Closed mattallan closed 1 year ago
This PR replaces the remaining wp_delete_post() function calls and deleted_post hooks that was interacting with Subscription objects.
wp_delete_post()
deleted_post
These instances have all been replaced with the $subscription->delete() equivalent and woocommerce_delete_subscription hooks.
$subscription->delete()
woocommerce_delete_subscription
Code review should be sufficient here, however, to test these changes:
woocommerce_downloadable_product_permissions
order_id
$subscription = wcs_get_subscription( 123 ); $subscription->delete( true );
Description
This PR replaces the remaining
wp_delete_post()
function calls anddeleted_post
hooks that was interacting with Subscription objects.These instances have all been replaced with the
$subscription->delete()
equivalent andwoocommerce_delete_subscription
hooks.How to test this PR
Code review should be sufficient here, however, to test these changes:
woocommerce_downloadable_product_permissions
table for a row with the subscription ID in theorder_id
columnProduct impact