Gocodebox_Banner_Notifier::notification_test_pmpro_license( bool $value,  $license_type )

PMPro license type test.


Parameters Parameters

$value

(bool) (Required) The current test value.

$license

(string) (Required) PMPro license type to check for.


Top ↑

Source Source

File: libraries/banner-notifications/src/notifications.php

	function notification_test_pmpro_license( $value, $license_type ) {
		if ( ! function_exists( 'pmpro_license_isValid' ) ) {
			return false;
		}

		if ( empty( $license_type ) ) {
			// If no license type, check they DON'T have a valid license key
			$valid = ! pmpro_license_isValid();
		} else {
			// Check if they have a valid key of the type specified
			$valid = pmpro_license_isValid( null, $license_type );
		}

		return $valid;
	}

Top ↑

User Contributed Notes User Contributed Notes

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