Plugin Directory

Changeset 3233952


Ignore:
Timestamp:
02/03/2025 12:40:34 PM (14 months ago)
Author:
invoked
Message:

cache issue fixed

File:
1 edited

Legend:

Unmodified
Added
Removed
  • biblio-dispatch/trunk/bibliodispatch-plugin.php

    r3232753 r3233952  
    6464        'secret_key' => $license_secret_key,  // Your secret key for API authentication
    6565        'license_key' => $license_key,   // The license key to check
    66         // 'registered_domain' => LICENSE_SERVER_URL,
    6766        'item_reference' => urlencode(BIBLIO_PLUGIN_ITEM_REFERENCE),
    6867    );
     
    7170    $url = add_query_arg($api_params, LICENSE_SERVER_URL);
    7271
     72    // Set headers to disable caching
     73    $args = array(
     74        'method'    => 'POST',
     75        'timeout'   => 20,
     76        'sslverify' => true,
     77        'headers'   => array(
     78            'Cache-Control' => 'no-cache, no-store, must-revalidate',
     79            'Pragma'        => 'no-cache',
     80            'Expires'       => '0',
     81        ),
     82    );
     83
    7384    // Send query to the license manager server
    74     $response = wp_remote_get($url, array('timeout' => 20, 'sslverify' => true));  // Set sslverify to true for production
     85    $response = wp_remote_post($url, array('timeout' => 20, 'sslverify' => true));  // Set sslverify to true for production
    7586    // Check for errors in the response
    7687    if (is_wp_error($response)) {
Note: See TracChangeset for help on using the changeset viewer.