Action_Scheduler\WP_CLI\Action

Delete_Command::on_action_deletedpublicWC 1.0

Action: action_scheduler_deleted_action

Метод класса: Delete_Command{}

Хуков нет.

Возвращает

null. Ничего (null).

Использование

$Delete_Command = new Delete_Command();
$Delete_Command->on_action_deleted( $action_id );
$action_id(int) (обязательный)
Action ID.

Код Delete_Command::on_action_deleted() WC 10.0.2

public function on_action_deleted( $action_id ) {
	if ( 'action_scheduler_deleted_action' !== current_action() ) {
		return;
	}

	$action_id = absint( $action_id );

	if ( ! in_array( $action_id, $this->action_ids, true ) ) {
		return;
	}

	$this->action_counts['deleted']++;
	\WP_CLI::debug( sprintf( 'Action %d was deleted.', $action_id ) );
}