PluginProbe
WP Coder – Insert & Manage Code Snippets / 1.1
WP Coder – Insert & Manage Code Snippets v1.1
4.5.1 1.1 2.3.1 2.3.2 2.4.1 2.5.1 2.5.2 2.5.3 2.5.4 2.5.5 2.5.6 3.0 3.0.1 3.0.2 3.0.3 3.0.4 3.0.5 3.1 3.1.1 3.2 3.2.1 3.3 3.4 3.5 3.5.1 All 39 releases
wp-coder / include / deactivator.php

deactivator.php in WP Coder – Insert & Manage Code Snippets 1.1, at include/deactivator.php

17 lines 686 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php if ( ! defined( 'ABSPATH' ) ) exit;
2 $license = trim( get_option( 'wow_license_key_'.self::PREF ) );
3 $api_params = array(
4 'edd_action'=> 'deactivate_license',
5 'license' => $license,
6 'item_name' => urlencode( $this->name ),
7 'url' => home_url()
8 );
9 $response = wp_remote_post( WOW_ESTORE, array( 'timeout' => 15, 'sslverify' => false, 'body' => $api_params ) );
10 // decode the license data
11 $license_data = json_decode( wp_remote_retrieve_body( $response ) );
12 // $license_data->license will be either "deactivated" or "failed"
13 if( $license_data->license == 'deactivated' ) {
14 delete_option( 'wow_license_status_'.self::PREF );
15 }
16 ?>
17