PluginProbe
ezCache / 2.5
ezCache v2.5
2.6.5 2.6.4 2.6.2 2.6.3 2.6.1 2.6.0 2.5.6 2.5.5 2.5.4 2.5.3 2.5.2 2.5.1 2.5 2.2.1 2.2.2 trunk 1.2 1.2.1 1.2.2 1.2.3 1.2.4 1.3 1.3.1 1.3.10 1.3.11 All 49 releases
ezcache / includes / Rest / LicenseController.php

LicenseController.php in ezCache 2.5, at includes/Rest/LicenseController.php

65 lines 1.4 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * LicenseController — stub (licensing system removed).
4 *
5 * Pro is unlocked for everyone. These endpoints are kept so the Vue admin
6 * UI doesn't 404, and they always report an active Pro plan.
7 */
8
9 namespace Upress\EzCache\Rest;
10
11 use Upress\EzCache\LicenseApi;
12
13 class LicenseController {
14
15 /**
16 * GET /license — Show license status
17 */
18 public function show() {
19 $manager = new LicenseApi();
20 $status = $manager->get_status();
21
22 return [
23 'success' => true,
24 'data' => [
25 'key' => '',
26 'type' => $status['type'],
27 'status' => $status['status'],
28 'expires_at' => $status['expires_at'],
29 'conversions_left' => $status['conversions_left'],
30 'plan' => isset( $status['plan'] ) ? $status['plan'] : '',
31 'freemius' => false,
32 'account_url' => '',
33 ],
34 ];
35 }
36
37 /**
38 * PATCH /license — Activate license (no-op).
39 */
40 public function update( $request ) {
41 return [
42 'success' => true,
43 'data' => [
44 'message' => __( 'Pro is already unlocked.', 'ezcache' ),
45 'freemius' => false,
46 'account_url' => '',
47 ],
48 ];
49 }
50
51 /**
52 * DELETE /license — Deactivate license (no-op).
53 */
54 public function destroy() {
55 return [
56 'success' => true,
57 'data' => [
58 'message' => __( 'Pro is unlocked for everyone; nothing to deactivate.', 'ezcache' ),
59 'freemius' => false,
60 'account_url' => '',
61 ],
62 ];
63 }
64 }
65