bsf_is_license_expired( string $product_id )
Returns true if the stored license expiry date is in the past.
Description
Lifetime licenses and products with no stored expiry always return false.
Parameters
- $product_id
-
(string) (Required) Product ID.
Return
(bool)
Source
File: admin/bsf-core/includes/helpers.php
function bsf_is_license_expired( $product_id ) {
$expires = bsf_get_license_expires( $product_id );
if ( empty( $expires ) || 'lifetime' === $expires ) {
return false;
}
$expires_ts = strtotime( $expires );
if ( false === $expires_ts ) {
return false;
}
return $expires_ts < time();
}
Expand full source code Collapse full source code View on Trac
Changelog
| Version | Description |
|---|---|
| 1.29.14 | Introduced. |