post

Over the past few weeks (April 2016) many of you have been reporting that your license keys are displaying as inactive and your cannot activate them. We’ve been in discussion with Easy Digital Downloads, the company who supplies the licence plugin, and we’re now in a position to share a fix for this issue.

Warning:
This fix does require a search and replace of code on a themes template, so please make sure you take a backup before you start.

Making the change in your WordPress Admin Dashboard

  1. Navigate to Appearance -> Editor (If your working in a multisite environment then you will need to access this page from your parent site dashboard Themes -> Editor.)
  2. Select your theme from the dropdown on the right hand side of the screen and click “Select”.
    Screenshot
  3. Scroll down the list of templates until you get to “theme-updater-admin.php”
    Screenshot (1)
  4. Click that link so it opens up an editor with that templates code
  5. Now find the following code:
function get_api_response( $api_params ) {

// Call the custom API.
$response = wp_remote_get(
add_query_arg( $api_params, $this->remote_api_url ),
array( 'timeout' => 15, 'sslverify' => false )
);

// Make sure the response came back okay.
if ( is_wp_error( $response ) ) {
return false;
}

$response = json_decode( wp_remote_retrieve_body( $response ) );

return $response;
}

And replace it with:

function get_api_response( $api_params ) {

// Call the custom API.
$response = wp_remote_post(
add_query_arg( $api_params, $this->remote_api_url ),
array( 'timeout' => 15, 'sslverify' => false )
);

// Make sure the response came back okay.
if ( is_wp_error( $response ) ) {
return false;
}

$response = json_decode( wp_remote_retrieve_body( $response ) );

return $response;
}

Save your changes by clicking “Update File”.

  1. Now navigate to the theme licence page Appearance -> Theme License
  2. Take a note of your licence key
  3. Delete it and click “Save Changes
  4. Paste it back in and click “Save Changes
  5. Now click “Activate License

You should now see some information regarding your licence which means its active.
Navigate to your themes page and you should see your theme needs an update.

Making the change manually

      1. Edit the file updater/theme-updater-admin.php
      2. Find the following code:
        function get_api_response( $api_params ) {
        
        // Call the custom API.
        $response = wp_remote_get(
        add_query_arg( $api_params, $this->remote_api_url ),
        array( 'timeout' => 15, 'sslverify' => false )
        );
        
        // Make sure the response came back okay.
        if ( is_wp_error( $response ) ) {
        return false;
        }
        
        $response = json_decode( wp_remote_retrieve_body( $response ) );
        
        return $response;
        }
        
      3. Replace it with:
        function get_api_response( $api_params ) {
        
        // Call the custom API.
        $response = wp_remote_post(
        add_query_arg( $api_params, $this->remote_api_url ),
        array( 'timeout' => 15, 'sslverify' => false )
        );
        
        // Make sure the response came back okay.
        if ( is_wp_error( $response ) ) {
        return false;
        }
        
        $response = json_decode( wp_remote_retrieve_body( $response ) );
        
        return $response;
        }
        

 

    1. Now navigate in your WordPress admin to the theme licence page Appearance -> Theme License
    2. Take a note of your licence key
    3. Delete it and click “Save Changes
    4. Paste it back in and click “Save Changes
    5. Now click “Activate License

You should now see some information regarding your licence which means its active.
Navigate to your themes page and you should see your theme needs an update.