PluginProbe
Advanced Access Manager – Access Governance for WordPress / 6.9.0
Advanced Access Manager – Access Governance for WordPress v6.9.0
7.1.4 7.1.2 7.1.3 6.8.4 6.8.5 6.9.0 6.9.1 6.9.10 6.9.11 6.9.12 6.9.13 6.9.14 6.9.15 6.9.16 6.9.17 6.9.18 6.9.19 6.9.2 6.9.20 6.9.21 6.9.22 6.9.23 6.9.24 6.9.25 6.9.26 All 210 releases
advanced-access-manager / application / Core / Server.php

Server.php in Advanced Access Manager – Access Governance for WordPress 6.9.0, at application/Core/Server.php

52 lines 1.1 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 /**
4 * ======================================================================
5 * LICENSE: This file is subject to the terms and conditions defined in *
6 * file 'license.txt', which is part of this source code package. *
7 * ======================================================================
8 */
9
10 /**
11 * Legacy class
12 *
13 * This class exists only to cover the fatal error during plugin update from 5.11 to
14 * 6.x.x. The problem is with the way AAM registers hooks to WP core `http_response`
15 * hook
16 *
17 * @package AAM
18 * @since 6.0.3
19 * @todo Remove in July 2021
20 */
21 final class AAM_Core_Server
22 {
23
24 /**
25 * Server endpoint
26 *
27 * @version 6.0.3
28 */
29 const SERVER_V2_URL = 'https://api.aamplugin.com/v2';
30
31 /**
32 * Get AAM server endpoint
33 *
34 * @param string $v
35 *
36 * @return string
37 *
38 * @access public
39 * @version 6.0.3
40 */
41 public static function getEndpoint($v = 'V1')
42 {
43 $endpoint = getenv("AAM_API_{$v}_ENDPOINT");
44
45 if (empty($endpoint)) {
46 $endpoint = self::SERVER_V2_URL;
47 }
48
49 return $endpoint;
50 }
51
52 }