LLMS_Engagements::unschedule_delayed_engagements( int $post_id, WP_Post|null $post = null )

Unschedule all scheduled actions for a delayed engagement


Description Description

This is the callback function for deleted engagement posts.

The deleted_post action param $post has been added since WordPress 5.5.0.


Top ↑

Parameters Parameters

$post_id

(int) (Required) WP_Post ID.

$post

(WP_Post|null) (Optional) Post object of the deleted post.

Default value: null


Top ↑

Return Return

(void)


Top ↑

Source Source

File: includes/class.llms.engagements.php

	public function unschedule_delayed_engagements( $post_id, $post = null ) {

		// @todo Remove compatibility with WP < 5.5 when bumping the minimum WP required version to 5.5+
		$post_type = $post ? $post->post_type : get_post_type( $post_id );

		if ( 'llms_engagement' === $post_type ) {
			as_unschedule_all_actions( '', array(), $this->get_delayed_group_id( $post_id ) );
		}

	}


Top ↑

Changelog Changelog

Changelog
Version Description
6.0.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.