{"id":160080,"date":"2022-07-14T10:53:07","date_gmt":"2022-07-14T10:53:07","guid":{"rendered":"https:\/\/wordpress.org\/plugins\/eacsoftwareregistry-distribution-sdk\/"},"modified":"2025-07-25T15:37:06","modified_gmt":"2025-07-25T15:37:06","slug":"eacsoftwareregistry-distribution-sdk","status":"publish","type":"plugin","link":"https:\/\/scn.wordpress.org\/plugins\/eacsoftwareregistry-distribution-sdk\/","author":20183118,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_crdt_document":"","version":"1.1.3","stable_tag":"1.1.3","tested":"6.8.5","requires":"5.8","requires_php":"7.4","requires_plugins":null,"header_name":"{eac}SoftwareRegistry Distribution SDK","header_author":"EarthAsylum Consulting","header_description":"Software Registration Server distribution - generate custom PHP packages that can be include in your project to register your product with your registration server.","assets_banners_color":"b4c5a5","last_updated":"2025-07-25 15:37:06","external_support_url":"","external_repository_url":"","donate_link":"https:\/\/github.com\/sponsors\/EarthAsylum","header_plugin_uri":"https:\/\/swregistry.earthasylum.com\/software-registry-sdk\/","header_author_uri":"http:\/\/www.earthasylum.com","rating":0,"author_block_rating":0,"active_installs":0,"downloads":2421,"num_ratings":0,"support_threads":0,"support_threads_resolved":0,"author_block_count":0,"sections":["description","installation","changelog"],"tags":{"1.0.1":{"tag":"1.0.1","author":"kevinburkholder","date":"2022-07-18 15:49:25"},"1.0.2":{"tag":"1.0.2","author":"kevinburkholder","date":"2022-08-28 13:54:09"},"1.0.3":{"tag":"1.0.3","author":"kevinburkholder","date":"2022-09-10 14:23:07"},"1.0.4":{"tag":"1.0.4","author":"kevinburkholder","date":"2022-09-28 20:42:33"},"1.0.5":{"tag":"1.0.5","author":"kevinburkholder","date":"2022-10-14 14:06:19"},"1.0.6":{"tag":"1.0.6","author":"kevinburkholder","date":"2023-03-31 14:04:18"},"1.0.7":{"tag":"1.0.7","author":"kevinburkholder","date":"2023-04-08 11:25:46"},"1.0.8":{"tag":"1.0.8","author":"kevinburkholder","date":"2023-04-17 14:09:52"},"1.0.9":{"tag":"1.0.9","author":"kevinburkholder","date":"2024-04-16 02:57:43"},"1.1.0":{"tag":"1.1.0","author":"kevinburkholder","date":"2024-11-20 16:14:36"},"1.1.1":{"tag":"1.1.1","author":"kevinburkholder","date":"2024-11-23 16:37:31"},"1.1.2":{"tag":"1.1.2","author":"kevinburkholder","date":"2025-07-21 22:10:11"},"1.1.3":{"tag":"1.1.3","author":"kevinburkholder","date":"2025-07-25 15:37:06"}},"upgrade_notice":[],"ratings":[],"assets_icons":{"icon-128x128.png":{"filename":"icon-128x128.png","revision":2756288,"resolution":"128x128","location":"assets","locale":""},"icon-256x256.png":{"filename":"icon-256x256.png","revision":2756288,"resolution":"256x256","location":"assets","locale":""}},"assets_banners":{"banner-1544x500.jpg":{"filename":"banner-1544x500.jpg","revision":2761826,"resolution":"1544x500","location":"assets","locale":""},"banner-772x250.jpg":{"filename":"banner-772x250.jpg","revision":2761826,"resolution":"772x250","location":"assets","locale":""}},"assets_blueprints":{},"all_blocks":[],"tagged_versions":["1.0.1","1.0.2","1.0.3","1.0.4","1.0.5","1.0.6","1.0.7","1.0.8","1.0.9","1.1.0","1.1.1","1.1.2","1.1.3"],"block_files":[],"assets_screenshots":{"screenshot-1.png":{"filename":"screenshot-1.png","revision":3092463,"resolution":"1","location":"assets","locale":""},"screenshot-2.png":{"filename":"screenshot-2.png","revision":3092463,"resolution":"2","location":"assets","locale":""},"screenshot-3.png":{"filename":"screenshot-3.png","revision":3092463,"resolution":"3","location":"assets","locale":""}},"screenshots":{"1":"<p>{eac}SoftwareRegistry Distribution\n<\/p>","2":"<p>UI Example 1 (Activate\/Register):\n<\/p>","3":"<p>UI Example 2 (Refresh\/Delete):\n<\/p>"},"jetpack_post_was_ever_published":false},"plugin_section":[],"plugin_tags":[146554,212051,26437,211904,211995],"plugin_category":[],"plugin_contributors":[211905],"plugin_business_model":[],"class_list":["post-160080","plugin","type-plugin","status-publish","hentry","plugin_tags-license-manager","plugin_tags-registration-api","plugin_tags-software-license","plugin_tags-software-registration","plugin_tags-software-registry","plugin_contributors-kevinburkholder","plugin_committers-kevinburkholder"],"banners":{"banner":"https:\/\/ps.w.org\/eacsoftwareregistry-distribution-sdk\/assets\/banner-772x250.jpg?rev=2761826","banner_2x":"https:\/\/ps.w.org\/eacsoftwareregistry-distribution-sdk\/assets\/banner-1544x500.jpg?rev=2761826","banner_rtl":false,"banner_2x_rtl":false},"icons":{"svg":false,"icon":"https:\/\/ps.w.org\/eacsoftwareregistry-distribution-sdk\/assets\/icon-128x128.png?rev=2756288","icon_2x":"https:\/\/ps.w.org\/eacsoftwareregistry-distribution-sdk\/assets\/icon-256x256.png?rev=2756288","generated":false},"screenshots":[{"src":"https:\/\/ps.w.org\/eacsoftwareregistry-distribution-sdk\/assets\/screenshot-1.png?rev=3092463","caption":"<p>{eac}SoftwareRegistry Distribution\n<\/p>"},{"src":"https:\/\/ps.w.org\/eacsoftwareregistry-distribution-sdk\/assets\/screenshot-2.png?rev=3092463","caption":"<p>UI Example 1 (Activate\/Register):\n<\/p>"},{"src":"https:\/\/ps.w.org\/eacsoftwareregistry-distribution-sdk\/assets\/screenshot-3.png?rev=3092463","caption":"<p>UI Example 2 (Refresh\/Delete):\n<\/p>"}],"raw_content":"<!--section=description-->\n<p><strong>{eac}SoftwareRegistry Distribution SDK<\/strong> is an extension plugin to <a href=\"https:\/\/swregistry.earthasylum.com\/software-registration-server\/\">{eac}SoftwareRegistry Software Registration Server<\/a>.<\/p>\n\n<p>The Software Registry Distribution SDK is used to generate a custom PHP package that you can include in your software project to register your product with your registration server and manage that registration.<\/p>\n\n<p><em>A custom version of this document is included in the generated SDK package.<\/em><\/p>\n\n<p>The SDK provides most of the PHP code you will need to implement the Application Program Interface with your Software Registration Server.<\/p>\n\n<p>Included with the Software Registration SDK package...<\/p>\n\n<ul>\n<li><code>(your_productid)_registration.(wordpress_or_filebased).trait.php<\/code><\/li>\n<li><code>(your_productid)_registration.includes.php<\/code><\/li>\n<li><code>(your_productid)_registration.interface.php<\/code><\/li>\n<li><code>(your_productid)_registration.interface.trait.php<\/code><\/li>\n<li><code>(your_productid)_registration.refresh.php<\/code><\/li>\n<li><code>(your_productid)_registration.readme.md<\/code><\/li>\n<\/ul>\n\n<h4>Software Registry Implementation<\/h4>\n\n<p>After extracting the <code>(your_productid)_registration.zip<\/code> file, move the <code>(your_productid)_registration<\/code> folder to your project.<\/p>\n\n<p>In your project or class file, include <code>(your_productid)_registration\/(your_productid)_registration.includes.php<\/code> to load the required interface and traits.<\/p>\n\n<p>Your class file must then:<\/p>\n\n<ul>\n<li>implement <code>\\(your_namespace)\\Interfaces\\(your_productid)_registration<\/code><\/li>\n<li>use <code>\\(your_namespace)\\Traits\\(your_productid)_registration_(wordpress_or_filebased)<\/code><\/li>\n<\/ul>\n\n<p>Example:<\/p>\n\n<pre><code>include \"(your_productid)_registration\/(your_productid)_registration.includes.php\";\n\nclass &lt;your_classname&gt; implements \\(your_namespace)\\Interfaces\\(your_productid)_registration\n{\n    use \\(your_namespace)\\Traits\\(your_productid)_registration_(wordpress_or_filebased);\n        ...\n}\n<\/code><\/pre>\n\n<p>(your_productid)_registration.interface.php will have your product and registration server API constants.<\/p>\n\n<pre><code>const SOFTWARE_REGISTRY_PRODUCTID   = '{your_software_registry_productid}';\nconst SOFTWARE_REGISTRY_HOST_URL    = '{your_software_registry_host_url}';\nconst SOFTWARE_REGISTRY_CREATE_KEY  = '{your_software_registry_create_key}';\nconst SOFTWARE_REGISTRY_UPDATE_KEY  = '{your_software_registry_update_key}';\nconst SOFTWARE_REGISTRY_READ_KEY    = '{your_software_registry_read_key}';\n<\/code><\/pre>\n\n<h4>Using The API<\/h4>\n\n<p><strong>API Parameters<\/strong><\/p>\n\n<p>API parameters are passed as an array:<\/p>\n\n<pre><code>$apiParams =\n[\n    'registry_key'          =&gt; 'unique ID',                     \/\/ * registration key (assigned by registry server)\n    'registry_name'         =&gt; 'Firstname Lastname',            \/\/   registrant's full name\n    'registry_email'        =&gt; 'email@domain.com',              \/\/ * registrant's email address\n    'registry_company'      =&gt; 'Comapny\/Organization Name',     \/\/   registrant's company name\n    'registry_address'      =&gt; 'Street\\n City St Zip',          \/\/   registrant's full address (textarea)\n    'registry_phone'        =&gt; 'nnnnnnnnnn',                    \/\/   registrant's phone\n    'registry_product'      =&gt; 'productId',                     \/\/ * your product name\/id ((your_productid))\n    'registry_title'        =&gt; 'Product Title',                 \/\/   your product title\n    'registry_description'  =&gt; 'Product Description',           \/\/   your product description\n    'registry_version'      =&gt; 'M.m.p',                         \/\/   your product version\n    'registry_license'      =&gt; 'Lx',                            \/\/   'L1'(Lite), 'L2'(Basic), 'L3'(Standard), 'L4'(Professional), 'L5'(Enterprise), 'LD'(Developer), 'LU'(Unlimited)\n    'registry_count'        =&gt; int,                             \/\/   Number of licenses (users\/seats\/devices)\n    'registry_variations'   =&gt; array('name'=&gt;'value',...),      \/\/   array of name\/value pairs\n    'registry_options'      =&gt; array('value',...),              \/\/   array of registry options\n    'registry_domains'      =&gt; array('domain',...),             \/\/   array of valid\/registered domains\n    'registry_sites'        =&gt; array('url',...),                \/\/   array of valid\/registered sites\/uris\n    'registry_transid'      =&gt; '',                              \/\/   external transaction id\n    'registry_timezone'     =&gt; '',                              \/\/   standard timezone string (client timezone)\n    'registry_locale'       =&gt; '',                              \/\/   standard locale\/language code\n];\n<\/code><\/pre>\n\n<p>&#042; <em>Required values (registry_key not required when creating a new registration).<\/em><\/p>\n\n<blockquote>\n  <p>If setting registry_transid, the recommended (not required) format is <code>{id}|{source}|{suffix}<\/code> where {id} is the transaction id, {source} indicates the source of the transaction, and {suffix} may be used as needed.<\/p>\n<\/blockquote>\n\n<p>Any additional fields passed wil be saved as custom fields.<\/p>\n\n<p>Although typically set by the Software Registry server, with the proper option setting, the API <em>may<\/em> override:<\/p>\n\n<pre><code>[\n    'registry_status'       =&gt; 'status',                        \/\/ 'pending', 'trial', 'active', 'inactive', 'expired', 'terminated'\n    'registry_effective'    =&gt; 'DD-MMM-YYYY',                   \/\/ Effective date\n    'registry_expires'      =&gt; 'DD-MMM-YYYY',                   \/\/ Expiration date or term ('30 days', '1 year',... added to effective date)\n];\n<\/code><\/pre>\n\n<p>Payment information may be posted with:<\/p>\n\n<pre><code>[\n    'registry_paydue'       =&gt; float,                           \/\/ amount to be paid\/billed,\n    'registry_payamount'    =&gt; float,                           \/\/ amount paid,\n    'registry_paydate'      =&gt; 'DD-MMM-YYYY',                   \/\/ date paid\n    'registry_payid'        =&gt; 'payment id'                     \/\/ transaction id\/check #, etc.\n    'registry_nextpay'      =&gt; 'DD-MMM-YYYY',                   \/\/ next payment\/renewal date\n];\n<\/code><\/pre>\n\n<p><strong>API Requests<\/strong><\/p>\n\n<p>Create\/request a new registration...<\/p>\n\n<pre><code>$response = $this-&gt;registryApiRequest('create',$apiParams);\n<\/code><\/pre>\n\n<p>Activate an existing registration...<\/p>\n\n<pre><code>$response = $this-&gt;registryApiRequest('activate',['registry_key' =&gt; '&lt;registrationKeyValue&gt;']);\n<\/code><\/pre>\n\n<p>Activate and Update an existing registration...<\/p>\n\n<pre><code>$response = $this-&gt;registryApiRequest('activate',$apiParams);\n<\/code><\/pre>\n\n<p>Deactivate an existing registration...<\/p>\n\n<pre><code>$response = $this-&gt;registryApiRequest('deactivate',['registry_key' =&gt; '&lt;registrationKeyValue&gt;']);\n<\/code><\/pre>\n\n<p>Verify or Refresh an existing registration...<\/p>\n\n<pre><code>$response = $this-&gt;registryApiRequest('verify',['registry_key' =&gt; '&lt;registrationKeyValue&gt;']);\n$response = $this-&gt;registryApiRequest('refresh',$apiParams);\n<\/code><\/pre>\n\n<p>Revise an existing registration...<\/p>\n\n<pre><code>$response = $this-&gt;registryApiRequest('revise',$apiParams);\n<\/code><\/pre>\n\n<p><strong>API Response<\/strong><\/p>\n\n<p>The API response is a standard object. status-&gt;code is an http status, 200 indicating success.<\/p>\n\n<pre><code>status      -&gt;\n(\n    code                  -&gt; 200,             \/\/ HTTP status code\n    message               -&gt; '(action) ok'    \/\/ (action) = 'create', 'activate', 'deactivate', 'verify', 'revise'\n),\nregistration -&gt;\n(\n    registry_key          -&gt; string           \/\/ UUID,\n    registry_status       -&gt; string,          \/\/ 'pending', 'trial', 'active', 'inactive', 'expired', 'terminated', 'invalid'\n    registry_effective    -&gt; string,          \/\/ DD-MMM-YYYY effective date\n    registry_expires      -&gt; string,          \/\/ DD-MMM-YYYY expiration date\n    registry_name         -&gt; string,\n    registry_email        -&gt; string,\n    registry_company      -&gt; string,\n    registry_address      -&gt; string,\n    registry_phone        -&gt; string,\n    registry_product      -&gt; string,\n    registry_title        -&gt; string,\n    registry_description  -&gt; string,\n    registry_version      -&gt; string,\n    registry_license      -&gt; string,\n    registry_count        -&gt; int,\n    registry_variations   -&gt; array,\n    registry_options      -&gt; array,\n    registry_domains      -&gt; array,\n    registry_sites        -&gt; array,\n    registry_transid      -&gt; string,\n    registry_timezone     -&gt; string,\n    registry_locale       -&gt; string,\n    registry_valid        -&gt; bool,\n),\nregistrar -&gt;\n(\n    contact               -&gt; object(\n        name              -&gt; string           \/\/ Registrar Name\n        email             -&gt; string           \/\/ Registrar Support Email\n        phone             -&gt; string           \/\/ Registrar Telephone\n        web               -&gt; string           \/\/ Registrar Web Address\n    ),\n    timezone              -&gt; string,          \/\/ standard timezone string\n    locale                -&gt; string,          \/\/ WordPress locale\n    cacheTime             -&gt; int,             \/\/ in seconds, time to cache the registration response (Default Cache Time)\n    refreshInterval       -&gt; int,             \/\/ in seconds, time before refreshing the registration (Default Refresh Time)\n    refreshSchedule       -&gt; string,          \/\/ 'hourly', 'twicedaily', 'daily', 'twiceweekly', 'weekly',  'twicemonthly', 'monthly' - corresponding to refreshInterval\n    options               -&gt; array(           \/\/ from settings page, registrar_options (Allow API to...)\n        'allow_set_key',\n        'allow_set_status',\n        'allow_set_effective',\n        'allow_set_expiration',\n        'allow_activation_update'\n    ),\n    licenseCodes          -&gt; object(          \/\/ may be changed by filter on registration server\n        L1                -&gt; 'Lite'\n        L2                -&gt; 'Basic'\n        L3                -&gt; 'Standard'\n        L4                -&gt; 'Professional'\n        L5                -&gt; 'Enterprise'\n        LD                -&gt; 'Developer'\n        LU                -&gt; 'Unlimited'\n    ),\n    notices               -&gt; object(\n        info              -&gt; string,          \/\/ information message text\n        warning           -&gt; string,          \/\/ warning message text\n        error             -&gt; string,          \/\/ error message text\n        success           -&gt; string,          \/\/ success message text\n    ),\n    message               -&gt; string,          \/\/ html message\n),\nregistryHtml              -&gt; string,          \/\/ html (table) of human-readable registration values\nsupplemental              -&gt; mixed,           \/\/ supplemental data\/html assigned via filters (developer's discretion).\n<\/code><\/pre>\n\n<p>On a successful response (status-&gt;code = 200), the SDK will automatically cache the registration data and schedule the next refresh event (you do not have to do this).<\/p>\n\n<p><em>notices<\/em> may be set (according to severity) to indicate an expiration or pending expiration and should be displayed to the user. Typically, only one notice will be set but they can be set via the <code>eacSoftwareRegistry_api_registration_notices<\/code> filter.<\/p>\n\n<p><em>message<\/em> is set via the <code>eacSoftwareRegistry_api_registration_message<\/code> filter.<\/p>\n\n<p><em>supplemental<\/em> is set via the <code>eacSoftwareRegistry_api_registration_supplemental<\/code> filter.<\/p>\n\n<p>On an error response, an additional element is included:<\/p>\n\n<pre><code>error      -&gt;\n(\n    code                  -&gt; 'error_code',\n    message               -&gt; 'error message'\n),\n<\/code><\/pre>\n\n<p>error-&gt;message may be more informative than status-&gt;message.\nErrors may be handled with something like:<\/p>\n\n<pre><code>if ($this-&gt;is_api_error($response))\n{\n    echo \"&lt;div class='notice notice-error'&gt;&lt;h4&gt;Error \".$response-&gt;error-&gt;code.\" : \".$response-&gt;error-&gt;message.\"&lt;\/h4&gt;&lt;\/div&gt;\";\n}\n<\/code><\/pre>\n\n<h4>Methods, Hooks, and Callbacks<\/h4>\n\n<p>Useful methods built into the SDK...<\/p>\n\n<pre><code>$this-&gt;isValidRegistration();\n    \/\/ Returns boolean\n    if ( $this-&gt;isValidRegistration() ) {...}\n\n$this-&gt;getRegistrationKey();\n    \/\/ Returns the current registration key\n    $registrationKey = $this-&gt;getRegistrationKey();\n\n$this-&gt;getCurrentRegistration();\n    \/\/ Returns the current registration object (above response object)\n    $currentRegistration = $this-&gt;getCurrentRegistration();\n\n$this-&gt;isRegistryValue($keyName);\n    \/\/ Returns the value of a specific registry key\n    $regStatus = $this-&gt;isRegistryValue( 'status ');\n\n$this-&gt;isRegistryValue($keyName, $value, $test);\n    \/\/ Returns boolean comparison of the value of a registry key ($test is '=|eq' (default), '&lt;|lt', '&gt;|gt', '&lt;=|le', '&gt;=|ge')\n    if ( $this-&gt;isRegistryValue('license', 'L3', '&gt;=') ) {...}\n<\/code><\/pre>\n\n<p>Several hooks are available to customize or react to registration events.\nIn WordPresss, there are several actions and filters, for file based projects there are corresponding callback methods...<\/p>\n\n<pre><code> filter\/callback: (your_productid)_api_remote_request( $request, $endpoint )\n    @param  array $request ['method'=&gt;, 'timeout'=&gt;, 'redirection'=&gt;, 'sslverify'=&gt;, 'headers'=&gt;, 'body'=&gt;]\n    @param  string $endpoint create, activate, deactivate, verify, refresh, revise\n    @return array request body\n\n action\/callback: (your_productid)_api_remote_response( $body, $request, $endpoint )\n    @param  array $body response body\n    @param  array $request ['method'=&gt;, 'timeout'=&gt;, 'redirection'=&gt;, 'sslverify'=&gt;, 'headers'=&gt;, 'body'=&gt;]\n    @param  string $endpoint create, activate, deactivate, verify, refresh, revise\n\n action\/callback: (your_productid)_api_remote_$endpoint( $body, $request, $endpoint )\n    @param  array $body response body\n    @param  array $request ['method'=&gt;, 'timeout'=&gt;, 'redirection'=&gt;, 'sslverify'=&gt;, 'headers'=&gt;, 'body'=&gt;]\n    @param  string $endpoint create, activate, deactivate, verify, refresh, revise\n\n action\/callback: (your_productid)_api_remote_error( $error, $request, $endpoint )\n    @param  object $error {status:{}, error: {}}\n    @param  array $request ['method'=&gt;, 'timeout'=&gt;, 'redirection'=&gt;, 'sslverify'=&gt;, 'headers'=&gt;, 'body'=&gt;]\n    @param  string $endpoint create, activate, deactivate, verify, refresh, revise\n\n action\/callback: (your_productid)_update_registration($registration)\n    @param  array $registration registration object\n\n action\/callback: (your_productid)_purge_registration()\n<\/code><\/pre>\n\n<h4>What You Need To Do<\/h4>\n\n<p><strong>For WordPress Projects<\/strong><\/p>\n\n<p>In your class constructor\/initialization, add an action to fulfill the registration refresh scheduled by the <code>scheduleRegistryRefresh()<\/code> method in <code>(your_productid).wordpress.trait.php<\/code><\/p>\n\n<pre><code>\\add_action( '(your_productid)_registry_refresh', array($this, 'refreshRegistration') );\n<\/code><\/pre>\n\n<p>You can add this and other hooks with:<\/p>\n\n<pre><code>$this-&gt;addSoftwareRegistryHooks();\n<\/code><\/pre>\n\n<p>The <code>addSoftwareRegistryHooks()<\/code> method adds:<\/p>\n\n<pre><code>\\add_action( '(your_productid)_registry_refresh',     array($this, 'refreshRegistration') );\n\\add_filter( '(your_productid)_is_registered',        array($this, 'isValidRegistration') );\n\\add_filter( '(your_productid)_registration_key',     array($this, 'getRegistrationKey') );\n\\add_filter( '(your_productid)_registration',         array($this, 'getCurrentRegistration') );\n\\add_filter( '(your_productid)_registry_value',       array($this, 'isRegistryValue'), 10, 4 );\n<\/code><\/pre>\n\n<p>Example:<\/p>\n\n<pre><code>include \"(your_productid)_registration\/(your_productid)_registration.includes.php\";\n\nclass &lt;your_classname&gt; implements \\(your_namespace)\\Interfaces\\(your_productid)_registration\n{\n    use \\(your_namespace)\\Traits\\(your_productid)_registration_wordpress;\n        ...\n    public function __construct()\n    {\n        $this-&gt;addSoftwareRegistryHooks();\n    }\n}\n<\/code><\/pre>\n\n<p>Note:<\/p>\n\n<p>If your primary plugin file name is not the same as the product id, edit your <code>(your_productid).interface.tpl<\/code> file and change the <code>SOFTWARE_REGISTRY_FILENAME<\/code> constant.<\/p>\n\n<pre><code>    const SOFTWARE_REGISTRY_FILENAME    = 'myPluginName';\n<\/code><\/pre>\n\n<p><strong>For Other File Based Projects<\/strong><\/p>\n\n<p>The <code>scheduleRegistryRefresh()<\/code> method in <code>(your_productid)_registration.filebased.trait.php<\/code> is called to schedule the next registration refresh. This method can be modified to schedule a cron event to execute the refresh at a future time. The scheduled event may run <code>(your_productid)_registration.refresh.php &lt;registrationKeyValue&gt;<\/code> from the command line to refresh the registration.<\/p>\n\n<p>When left as is, the <code>checkRegistryRefreshEvent()<\/code> method uses the key file to check for a needed registration refresh.<\/p>\n\n<p>In your class constructor or destructor add:<\/p>\n\n<pre><code>$this-&gt;checkRegistryRefreshEvent();\n<\/code><\/pre>\n\n<p>to trigger the refresh check.<\/p>\n\n<p>Example:<\/p>\n\n<pre><code>include \"(your_productid)_registration\/(your_productid)_registration.includes.php\";\n\nclass &lt;your_classname&gt; implements \\(your_namespace)\\Interfaces\\(your_productid)_registration\n{\n    use \\(your_namespace)\\Traits\\(your_productid)_registration_filebased;\n        ...\n    public function __destruct()\n    {\n        \/* if necessary, set HOME\/USERPROFILE and\/or TMP\/TMPDIR\/TEMP directories *\/\n        \/\/ putenv('HOME={your home directory}');   \/\/ where the registration key is stored, otherwise use $_SERVER['DOCUMENT_ROOT']\n        \/\/ putenv('TMP={your temp directory}');    \/\/ where the registration data is stored, otherwise use sys_get_temp_dir()\n        $this-&gt;checkRegistryRefreshEvent();\n    }\n}\n<\/code><\/pre>\n\n<h4>User Interface<\/h4>\n\n<p>Of course, the user interface is up to you, the developer, but you may look at (and maybe use) the registration UI trait included  with <em>{eac}Doojigger<\/em> and used by <em>{eac}SoftwareRegistry<\/em> as an example.<\/p>\n\n<p>see:<\/p>\n\n<ul>\n<li>...\/Traits\/swRegistrationUI.trait.php in the eacDoojigger folder.<\/li>\n<li>...\/Extensions\/class.eacSoftwareRegistry_registration.extension.php in the eacSoftwareRegistry folder.<\/li>\n<\/ul>\n\n<h4>See Also<\/h4>\n\n<ul>\n<li><p><a href=\"https:\/\/swregistry.earthasylum.com\/software-registration-server\/\">{eac}SoftwareRegistry \u2013 Software Registration Server<\/a><\/p><\/li>\n<li><p><a href=\"https:\/\/swregistry.earthasylum.com\/software-registry-hooks\/\">{eac}SoftwareRegistry Custom Hooks<\/a><\/p><\/li>\n<\/ul>\n\n<h3>Copyright<\/h3>\n\n<h4>Copyright \u00a9 2019-2025, EarthAsylum Consulting, distributed under the terms of the GNU GPL.<\/h4>\n\n<p>This program is free software: you can redistribute it and\/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.<\/p>\n\n<p>This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.<\/p>\n\n<p>You should receive a copy of the GNU General Public License along with this program. If not, see <a href=\"https:\/\/www.gnu.org\/licenses\/\">https:\/\/www.gnu.org\/licenses\/<\/a>.<\/p>\n\n<!--section=installation-->\n<p><strong>{eac}SoftwareRegistry Distribution SDK<\/strong> is an extension plugin to and requires installation and registration of <a href=\"https:\/\/swregistry.earthasylum.com\/\">{eac}SoftwareRegistry<\/a>.*<\/p>\n\n<h4>Automatic Plugin Installation<\/h4>\n\n<p>This plugin is available from the <a href=\"https:\/\/wordpress.org\/plugins\/search\/earthasylum\/\">WordPress Plugin Repository<\/a> and can be installed from the WordPress Dashboard \u00bb <em>Plugins<\/em> \u00bb <em>Add New<\/em> page. Search for 'EarthAsylum', click the plugin's [Install] button and, once installed, click [Activate].<\/p>\n\n<p>See <a href=\"https:\/\/wordpress.org\/support\/article\/managing-plugins\/#automatic-plugin-installation-1\">Managing Plugins -&gt; Automatic Plugin Installation<\/a><\/p>\n\n<h4>Upload via WordPress Dashboard<\/h4>\n\n<p>Installation of this plugin can be managed from the WordPress Dashboard \u00bb <em>Plugins<\/em> \u00bb <em>Add New<\/em> page. Click the [Upload Plugin] button, then select the eacsoftwareregistry-distribution-sdk.zip file from your computer.<\/p>\n\n<p>See <a href=\"https:\/\/wordpress.org\/support\/article\/managing-plugins\/#upload-via-wordpress-admin\">Managing Plugins -&gt; Upload via WordPress Admin<\/a><\/p>\n\n<h4>Manual Plugin Installation<\/h4>\n\n<p>You can install the plugin manually by extracting the eacsoftwareregistry-distribution-sdk.zip file and uploading the 'eacsoftwareregistry-distribution-sdk' folder to the 'wp-content\/plugins' folder on your WordPress server.<\/p>\n\n<p>See <a href=\"https:\/\/wordpress.org\/support\/article\/managing-plugins\/#manual-plugin-installation-1\">Managing Plugins -&gt; Manual Plugin Installation<\/a><\/p>\n\n<h4>Settings<\/h4>\n\n<p>Options for this extension will be added to the <em>Software Registry \u00bb Settings \u00bb Distribution<\/em> tab.<\/p>\n\n<!--section=changelog-->\n<h4>Version 1.1.3 \u2013 July 25, 2025<\/h4>\n\n<ul>\n<li>Added <code>SOFTWARE_REGISTRY_FILENAME<\/code> in softwareregistry.interface.\n\n<ul>\n<li>Defaults to <code>SOFTWARE_REGISTRY_PRODUCTID<\/code>.<\/li>\n<li>Manually change if plugin file name is not the same as the product id.<\/li>\n<\/ul><\/li>\n<li>Date formats documented as <code>DD-MMM-YYYY<\/code>.<\/li>\n<li>Use <code>registrar-&gt;timezone<\/code> when comparing dates (effective, expires).<\/li>\n<li>Add timestamp to download link (cache buster).<\/li>\n<\/ul>\n\n<h4>Version 1.1.2 \u2013 April 19, 2025<\/h4>\n\n<ul>\n<li>Compatible with WordPress 6.8+<\/li>\n<\/ul>\n\n<h4>Version 1.1.1 \u2013 November 23, 2024<\/h4>\n\n<ul>\n<li>Fix bug when creating zip file.<\/li>\n<\/ul>\n\n<h4>Version 1.1.0 \u2013 November 20, 2024<\/h4>\n\n<ul>\n<li>Use wp_filesystem when creating SDK (note that zip_archive does not).<\/li>\n<li>Addition of <code>supplemental<\/code> key in registry api response data.<\/li>\n<li>SDK output has not changed and it is not necessary to recreate SDKs.<\/li>\n<li>Compatible with WordPress 6.7+<\/li>\n<\/ul>\n\n<h4>Version 1.0.9 \u2013 June 6, 2023<\/h4>\n\n<ul>\n<li>Removed unnecessary plugin_update_notice trait.<\/li>\n<\/ul>\n\n<h4>Version 1.0.8 \u2013 April 17, 2023<\/h4>\n\n<ul>\n<li>Added 'refresh' api call like 'verify', with update parameters.<\/li>\n<li>Retains current registration if api call fails (non-200 status).<\/li>\n<\/ul>\n\n<h4>Version 1.0.7 \u2013 April 8, 2023<\/h4>\n\n<ul>\n<li>Fixed encoding of response error message in api call traits.<\/li>\n<\/ul>\n\n<h4>Version 1.0.6 \u2013 November 15, 2022<\/h4>\n\n<ul>\n<li>Updated for {eac}SoftwareRegistry v1.2 and {eac}Doojigger v2.0.<\/li>\n<li>Uses 'options_settings_page' action to register options.<\/li>\n<li>Moved plugin_action_links_ hook to eacSoftwareRegistry_load_extensions filter.<\/li>\n<li>Improved plugin loader and updater.<\/li>\n<\/ul>\n\n<h4>Version 1.0.5 \u2013 October 23, 2022<\/h4>\n\n<ul>\n<li>Fixed slug name in WordPress trait.<\/li>\n<li>Fix potential PHP notice in interface.trait on registry api error.<\/li>\n<li>Lowered API timeout to 6 seconds.<\/li>\n<li>Added API retry on http status 408.<\/li>\n<\/ul>\n\n<h4>Version 1.0.4 \u2013 September 24, 2022<\/h4>\n\n<ul>\n<li>Fixed potential PHP notice on load (plugin_action_links_).<\/li>\n<li>Added upgrade notice trait for plugins page.<\/li>\n<li>Fixed pattern attribute.<\/li>\n<\/ul>\n\n<h4>Version 1.0.3 \u2013 September 10, 2022<\/h4>\n\n<ul>\n<li>Fix validation attributes on input fields.<\/li>\n<\/ul>\n\n<h4>Version 1.0.2 \u2013 August 28, 2022<\/h4>\n\n<ul>\n<li>Updated to \/ Requires {eac}Doojigger 1.2.0<\/li>\n<li>Added 'Settings', 'Docs' and 'Support' links on plugins page.<\/li>\n<\/ul>\n\n<h4>Version 1.0.1 \u2013 July 14, 2022<\/h4>\n\n<ul>\n<li>Cosmetic changes for WordPress submission.<\/li>\n<li>Renamed SDK .php files to .tpl to prevent SVN pre-compile errors.<\/li>\n<\/ul>\n\n<h4>Version 1.0.0 \u2013 May 4, 2022<\/h4>\n\n<ul>\n<li>Initial public release.<\/li>\n<\/ul>","raw_excerpt":"{eac}SoftwareRegistry Distribution SDK for the Software Registration Server - Implementing the Software Registry SDK Package.","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/scn.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin\/160080","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/scn.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin"}],"about":[{"href":"https:\/\/scn.wordpress.org\/plugins\/wp-json\/wp\/v2\/types\/plugin"}],"replies":[{"embeddable":true,"href":"https:\/\/scn.wordpress.org\/plugins\/wp-json\/wp\/v2\/comments?post=160080"}],"author":[{"embeddable":true,"href":"https:\/\/scn.wordpress.org\/plugins\/wp-json\/wporg\/v1\/users\/kevinburkholder"}],"wp:attachment":[{"href":"https:\/\/scn.wordpress.org\/plugins\/wp-json\/wp\/v2\/media?parent=160080"}],"wp:term":[{"taxonomy":"plugin_section","embeddable":true,"href":"https:\/\/scn.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_section?post=160080"},{"taxonomy":"plugin_tags","embeddable":true,"href":"https:\/\/scn.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_tags?post=160080"},{"taxonomy":"plugin_category","embeddable":true,"href":"https:\/\/scn.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_category?post=160080"},{"taxonomy":"plugin_contributors","embeddable":true,"href":"https:\/\/scn.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_contributors?post=160080"},{"taxonomy":"plugin_business_model","embeddable":true,"href":"https:\/\/scn.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_business_model?post=160080"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}