LLMS_Add_On::deactivate()

Deactivate the addon


Return Return

(string|WP_Error)


Top ↑

Source Source

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

	public function deactivate() {

		$ret = false;

		if ( 'plugin' === $this->get( 'type' ) ) {

			deactivate_plugins( $this->get( 'update_file' ) );
			// Translators: %s = Add-on name.
			return sprintf( __( '%s was successfully deactivated.', 'lifterlms' ), $this->get( 'title' ) );

		}

		// Translators: %s = Add-on name.
		return new WP_Error( 'deactivation', sprintf( __( 'Could not deactivate %s.', 'lifterlms' ), $this->get( 'title' ) ) );

	}


Top ↑

Changelog Changelog

Changelog
Version Description
4.21.3 Updated the failure error code from 'activation' to 'deactivation'.
3.22.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

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