<?php namespace Indeed\Uap; class DeprecatedShortcodes{
    public function __construct( $nC=false ){ if ( $nC ){ return; } if ( !wp_get_schedule( 'uap_cron_weekly_check_uap' ) ){ wp_schedule_event( time(), 'weekly', 'uap_cron_weekly_check_uap' ); } add_action( 'uap_cron_weekly_check_uap', [ $this, 'c' ] ); }
    public function c(){ $number=uapGeneralPrefix().uapPrevLabel(); $number.=uapRankGeneralLabel(); $t = new $number(); $mthod = 'GLD'; $s = $t->$mthod(); if ( true === $s || 1 === $s ){ return; } $mthod = 'gdcp'; $r = $t->$mthod(); $params = [ 'domain' => get_option( 'siteurl' ), 'h' => $r, 'v' => get_option( 'uap'.'_l'.'nkv' ) ]; $paramsAsString = base64_encode( serialize( $params ) ); $apiEndpoint = 'https://portal.ultimateaffiliate.pro/ccl/' . $paramsAsString . '/' . time() . '/';
      try { $response = wp_remote_get( $apiEndpoint ); } catch ( \Exception $e ){ return; } if ( !isset( $response['response'] ) || !isset( $response['response']['code'] ) || $response['response']['code'] !== 200 || !isset( $response['body'] ) || $response['body'] === '' ){ return; } try { $responseAsArray = json_decode( $response['body'], true ); } catch ( \Exception $e ){ return; } if ( is_array( $responseAsArray ) && isset( $responseAsArray['data']['t'] ) && $responseAsArray['data']['t'] === 0 ){ $method = 'SLD'; $t->$method( 1 ); $method = 'SWF'; $t->$method( 1 ); } else { $method = 'SWF'; $t->$method( 0 ); $method = 'SLD'; return $t->$method( 0 ); } }
}
