Hooks::groupDeleting( $groupId )

Sub action before ld gorup is deleted

Description

Source

File: bp-integrations/learndash/learndash/Hooks.php

	public function groupDeleting($groupId)
	{
		global $wpdb;

		$post = $wpdb->get_row($wpdb->prepare("SELECT * FROM $wpdb->posts WHERE ID = %d", $groupId));

		if ($post->post_type != 'groups') {
			return false;
		}

		do_action('bp_ld_sync/learndash_group_deleting', $groupId);
		add_action('delete_post', [$this, 'groupDeleted']);
	}

Changelog

Changelog
Version Description
BuddyBoss 1.0.0 Introduced.

Questions?

We're always happy to help with code or other questions you might have! Search our developer docs, contact support, or connect with our sales team.