Plugin Directory

Changeset 3101942


Ignore:
Timestamp:
06/12/2024 06:35:37 PM (22 months ago)
Author:
webocoders
Message:

Updated class.php and readme.txt for version 2.2

Location:
udimi-optin/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • udimi-optin/trunk/class.php

    r2817676 r3101942  
    1111    const PLUGIN_FOLDER = 'udimi-optin';
    1212    const OPTIN_CODE_TTL_HOURS = 24;
     13    const UA = 'UdimiOptinWordpress-12062024';
    1314
    1415    private $apiError = '';
     
    103104        }
    104105
    105         $res = wp_remote_get($this->getApiUrl($key));
     106        $res = wp_remote_get($this->getApiUrl($key), [
     107            'headers' => [
     108                'User-Agent' => self::UA,
     109            ],
     110        ]);
    106111
    107112        if (!is_array($res)) {
     
    145150    private function getApiUrl($key)
    146151    {
    147         return (self::IS_LOCAL ? self::API_HOST_LOCAL : self::API_HOST_PROD) . "/v1/guests/wordpress-plugin-ot/get-code/$key";
    148     }
     152        return (self::IS_LOCAL ? self::API_HOST_LOCAL : self::API_HOST_PROD) . "/v1/guests/wordpress-plugin-ot/get-code/$key?v=" . self::UA;
     153    }
    149154
    150155    ////////////
  • udimi-optin/trunk/readme.txt

    r2817676 r3101942  
    22Tags: udimi, solo, optin
    33Requires at least: 3.0
    4 Tested up to: 6.1
    5 Stable tag: 2.1
     4Tested up to: 6.5
     5Stable tag: 2.2
    66Contributors: udimi.com
    77License: GPLv2 or later
Note: See TracChangeset for help on using the changeset viewer.