Skip to content

Commit

Permalink
Fixed bug
Browse files Browse the repository at this point in the history
  • Loading branch information
sersart committed May 29, 2023
1 parent 7157ed5 commit 68c76e8
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions src/twz-software-license-manager-library.php → src/license.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php
namespace themewizz\license;

class TWZ_Software_License_Manager_library
class license
{
/**
* The secret key.
Expand Down Expand Up @@ -214,14 +214,14 @@ function domainRegistered()
*
* @return integer
*/
function daysToExpiry()
{
$todayDate = new DateTime('now');
$expiryDate = new DateTime($this->details->date_expiry);
$daysToExpiry = $todayDate->diff($expiryDate);
// function daysToExpiry()
// {
// $todayDate = new DateTime('now');
// $expiryDate = new DateTime($this->details->date_expiry);
// $daysToExpiry = $todayDate->diff($expiryDate);

return intval($daysToExpiry->format('%R%a'));
}
// return intval($daysToExpiry->format('%R%a'));
// }

// ---------------------------------------------------------------------------
/**
Expand Down Expand Up @@ -316,9 +316,9 @@ function show($data, $showDetails = true)
$domains = substr($domains, 0, -2); // Remove last comma and blank
}
$daysleft = "";
if ($daysToExpiry = $this->daysToExpiry()) {
$daysleft = " (" . $daysToExpiry . " " . $this->lang['lic_daysleft'] . ")";
}
// if ($daysToExpiry = $this->daysToExpiry()) {
// $daysleft = " (" . $daysToExpiry . " " . $this->lang['lic_daysleft'] . ")";
// }

$details = "<div style=\"height:20px;\"></div>";
$details .= "<table class=\"table table-hover\">
Expand Down

0 comments on commit 68c76e8

Please sign in to comment.