Skip Navigation

[Resolved] Deleting relationship programmatically

This support ticket is created 3 years, 1 month ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

No supporters are available to work today on Toolset forum. Feel free to create tickets and we will handle it as soon as we are online. Thank you for your understanding.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 -
- 13:00 – 18:00 13:00 – 18:00 13:00 – 18:00 14:00 – 18:00 13:00 – 18:00 -

Supporter timezone: America/Jamaica (GMT-05:00)

This topic contains 2 replies, has 2 voices.

Last updated by Bob 3 years, 1 month ago.

Assisted by: Shane.

Author
Posts
#2004169

Bob

I'm using cred-delete-relationship in the front end to remove a relationship and that works fine.

In specific circumstances I'd like to do something before the relationship is removed so I thought I'd create a new page with a shortcode to do what I wanted then delete the relationship but I can't use cred-delete-relationship as it requires the clicking of the link.

Any suggestion how I can code the relationship deletion.

#2004385

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Bob,

Thank you for getting in touch.

Perhaps you can explore using the hook below to resolve your issue.
https://toolset.com/documentation/customizing-sites-using-php/post-relationships-api/#toolset_before_association_delete

This hook will allow you to perform an action before the relationship has been deleted and is triggered once you perform the delete relationship request.

Please let em know if this helps.
Thanks,
Shane

#2004399

Bob

My issue is resolved now. Thank you!

This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.