File: /home/cafsindia/public_html/wp-content/plugins/imageseo/src/Services/UserInfo.php
<?php
namespace ImageSeoWP\Services;
if (!defined('ABSPATH')) {
exit;
}
class UserInfo
{
protected $limitExcedeed = null;
public function hasLimitExcedeed()
{
if (null !== $this->limitExcedeed) {
return $this->limitExcedeed;
}
$user = imageseo_get_service('ClientApi')->getOwnerByApiKey();
if(!$user) {
return true;
}
$imageLeft = ($user['bonus_stock_images'] + $user['plan']['limit_images']) - $user['current_request_images'];
$this->limitExcedeed = ($imageLeft <= 0) ? true : false;
return $this->limitExcedeed;
}
}