PluginProbe
Cookie Consent – GDPR & CCPA Cookie Banner & Consent Manager / trunk
Cookie Consent – GDPR & CCPA Cookie Banner & Consent Manager vtrunk
0.0.11 0.0.10 0.0.9 0.0.8 0.0.7 0.0.6 trunk 0.0.1 0.0.2 0.0.3 0.0.4 0.0.5
cookiez / modules / connect / classes / data.php

data.php in Cookie Consent – GDPR & CCPA Cookie Banner & Consent Manager trunk, at modules/connect/classes/data.php

26 lines 571 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 namespace Cookiez\Modules\Connect\Classes;
4
5 use Cookiez\Modules\Settings\Classes\Settings;
6 use Cookiez\Modules\Settings\Module as Settings_Module;
7
8 if ( ! defined( 'ABSPATH' ) ) {
9 exit; // Exit if accessed directly
10 }
11
12 class Data {
13 public static function scans_left(): int {
14 if ( Settings_Module::is_elementor_one() ) {
15 return PHP_INT_MAX;
16 }
17
18 $plan = get_option( Settings::PLAN_DATA );
19
20 $allowed = (int) ( $plan->quota->cookie_scans->allowed ?? 0 );
21 $used = (int) ( $plan->quota->cookie_scans->used ?? 0 );
22
23 return max( 0, $allowed - $used );
24 }
25 }
26