WordPress at Your Fingertips
function is not described

ActionScheduler_wpPostStore::cancel_action() public WC 1.0

Cancel action.

{} It's a method of the class: ActionScheduler_wpPostStore{}

Hooks from the method

Return

null. Nothing.

Usage

$ActionScheduler_wpPostStore = new ActionScheduler_wpPostStore();
$ActionScheduler_wpPostStore->cancel_action( $action_id );
$action_id(int) (required)
Action ID.

Code of ActionScheduler_wpPostStore::cancel_action() WC 6.1.1

public function cancel_action( $action_id ) {
	$post = get_post( $action_id );
	if ( empty( $post ) || ( self::POST_TYPE !== $post->post_type ) ) {
		/* translators: %s is the action ID */
		throw new InvalidArgumentException( sprintf( __( 'Unidentified action %s', 'woocommerce' ), $action_id ) );
	}
	do_action( 'action_scheduler_canceled_action', $action_id );
	add_filter( 'pre_wp_unique_post_slug', array( $this, 'set_unique_post_slug' ), 10, 5 );
	wp_trash_post( $action_id );
	remove_filter( 'pre_wp_unique_post_slug', array( $this, 'set_unique_post_slug' ), 10 );
}