LLMS_Add_On::uninstall()

Verifies the add-on can be uninstalled, and performs the uninstall (permanently deleting its files)


Return Return

(string|WP_Error) Success message or an error object.


Top ↑

Source Source

File: includes/models/model.llms.add-on.php

	public function uninstall() {

		$title = $this->get( 'title' );

		if ( ! $this->is_installed() ) {
			// Translators: %s = Add-on title.
			return new WP_Error( 'not-installed', sprintf( __( '%s is not installed.', 'lifterlms' ), $title ) );
		}

		if ( $this->is_active() ) {
			// Translators: %s = Add-on title.
			return new WP_Error( 'uninstall-active', sprintf( __( '%s is active and cannot be uninstalled.', 'lifterlms' ), $title ) );
		}

		return $this->uninstall_real();

	}


Top ↑

Changelog Changelog

Changelog
Version Description
5.1.1 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

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