AnsPress_Email_Hooks::delete_subscriptions( integer $postid )

Description #

Delete subscriptions.

Parameters #

  • $postid
    integer (Required) Post ID.

Source #

File: addons/free/email.php

	public static function delete_subscriptions( $postid ) {
		$_post = get_post( $postid );

		if ( 'question' === $_post->post_type ) {
			// Delete question subscriptions.
			ap_delete_subscribers( 'question', $postid );
		}

		if ( 'answer' === $_post->post_type ) {
			// Delete question subscriptions.
			ap_delete_subscribers( 'answer_' . $_post->post_parent );
		}
	}

Leave a Reply

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Add your comment