How to Make GRAVITY FORMS Fully Works

Sometimes Gravity Forms will not work as expected. Especially when we lose its license key. We can’t even create a single new form when it happens. In addition, Gravity Forms options/settings can’t be accessed as well.

There are some steps we can do to solve this issue.

We need to edit 2 files below:

  • gravityforms/includes/wizard/steps/class-gf-installation-wizard-step-license-key.php
  • gravityforms/common.php

1. In the first file, find these 2 lines of code as shown below (line 58):

$this->is_valid_key = true;
$license_key = $this->license_key;

AFTER that code, add this:

$valid = $this->is_valid_key || ( ! $this->is_valid_key && $this->accept_terms );
return $valid;

Now it will look like:

2. In the second file, locate the codes as shown below (line 2484):

// Caching response.
set_transient( 'gform_update_info', $version_info, 86400 ); //caching for 24 hours

BEFORE that code, add this:

$version_info = json_decode( $raw_response['body'], true );
$version_info['is_valid_key'] = '1';

Now it will work fully with any license key we use. This method was tested on Gravity Forms v2.2.5.11. However it should be quite the same for the other versions.

[Total: 0    Average: 0/5]

Leave a Reply