Warning: Array to string conversion in /mnt/data/home/502433.cloudwaysapps.com/rhbymdevka/public_html/wp-content/themes/wporg-developer/inc/template-tags.php on line 808
PUM_Licensing::get_status( $license = null,  $has_key = false )

Get the current license status.


Description Description


Warning: Array to string conversion in /mnt/data/home/502433.cloudwaysapps.com/rhbymdevka/public_html/wp-content/themes/wporg-developer/inc/template-tags.php on line 808

Return Return

(string)


Top ↑

Source Source

File: classes/Licensing.php

	public static function get_status( $license = null, $has_key = false ) {
		$status = $has_key ? 'inactive' : 'empty';

		if ( self::has_license( $license ) ) {
			// activate_license 'invalid' on anything other than valid, so if there was an error capture it
			if ( false === $license->success ) {
				$error = property_exists( $license, 'error' ) ? $license->error : $status;

				switch ( $error ) {
					case 'expired' :
						$status = 'expired';
						break;
					case 'revoked' :
					case 'missing' :
					case 'invalid' :
					case 'site_inactive' :
					case 'item_name_mismatch' :
					case 'no_activations_left':
					case 'license_not_activable':
					default :
						$status = 'error';
						break;
				}
			} else {
				$status = 'valid';
			}
		}

		return $status;
	}


Top ↑

User Contributed Notes User Contributed Notes

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