How to activate Social Warfare Pro

by Festinger in on June 17, 2020

The edits are made in the free version of the plugin in order for it to function as a Pro version. You can download free plugin here.

In the file lib/Social_Warfare_addon.php find the function establish_registration which starts around line 68 and add this at the start of the function code:

return true;

In the same file, find the function register_plugin which starts around line 145. In that function, around line 164 change this:

$response = wp_remote_retrieve_body( wp_remote_post( $this->store_url, array( 'body' => $api_params, 'timeout' => 10 ) ) );

to this:

$response = '{"success":true, "license":"valid", "item_name":"social-warfare-pro", "license_limit":999, "site_count":1, "expires":"2048-06-06 23:59:59", "activations_left":998, "payment_id":"12345", "customer_name":"Mr Blobby", "customer_email":"noneofyour@business.com", "price_id":"1"}';

Now find the unregister_plugin function which starts around line 222 and around line 250 change this:

$response = wp_remote_retrieve_body( wp_remote_post( $this->store_url, array( 'body' => $api_params, 'timeout' => 10 ) ) );

to this:

$response = '{"success":true, "license":"valid"}';

Now use any key to activate and register the plugin (you can also de-register it safely with the button).

Categories: Uncategorized