Evolution request #6 : Add a action on the method
-
Hi,
Evolution request.
Is it possible to add a action on the “delete_subscription” method of the “ProfilePress\Core\Membership\Services\SubscriptionService” class?
We need to trigger an action after deleting a subscription.
public function delete_subscription($sub_id) { $sub = SubscriptionFactory::fromId($sub_id); $sub->remove_plan_role_from_customer(); $result = SubscriptionRepository::init()->delete($sub_id); if ($result) { PROFILEPRESS_sql::delete_meta_data_by_flag($sub->get_meta_flag_id()); } do_action('ppress_delete_subscription', $sub_id, $sub); return $result; }
THANKS !!
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Evolution request #6 : Add a action on the method’ is closed to new replies.