# imagify/trunk/inc/Dependencies/ActionScheduler/classes/actions/ActionScheduler_CanceledAction.php

Imagify Image Optimization: Optimize Images | Compress &amp; Convert to WebP/AVIF, version trunk. 26 lines.

- Page: https://pluginprobe.com/plugins/imagify/trunk/code/inc/Dependencies/ActionScheduler/classes/actions/ActionScheduler_CanceledAction.php
- Raw: https://pluginprobe.com/plugins/imagify/trunk/raw/inc/Dependencies/ActionScheduler/classes/actions/ActionScheduler_CanceledAction.php
- Modified: 2025-05-28T15:57:10+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/imagify/trunk/code/inc/Dependencies/ActionScheduler/classes/actions/ActionScheduler_CanceledAction.php#L10-L20`.

```php
<?php

/**
 * Class ActionScheduler_CanceledAction
 *
 * Stored action which was canceled and therefore acts like a finished action but should always return a null schedule,
 * regardless of schedule passed to its constructor.
 */
class ActionScheduler_CanceledAction extends ActionScheduler_FinishedAction {

	/**
	 * Construct.
	 *
	 * @param string                        $hook Action's hook.
	 * @param array                         $args Action's arguments.
	 * @param null|ActionScheduler_Schedule $schedule Action's schedule.
	 * @param string                        $group Action's group.
	 */
	public function __construct( $hook, array $args = array(), ?ActionScheduler_Schedule $schedule = null, $group = '' ) {
		parent::__construct( $hook, $args, $schedule, $group );
		if ( is_null( $schedule ) ) {
			$this->set_schedule( new ActionScheduler_NullSchedule() );
		}
	}
}

```
