'activation', 'email' => $email, 'licence_key' => $licence_key, 'product_id' => $product_id, ); $base_url = 'http://3xsocializersoftware.com/'.add_query_arg( 'wc-api', 'software-api', ''); $target_url = $base_url . '&' . http_build_query( $args ); // echo $target_url; $data = wp_remote_get( $target_url ); $result = json_decode($data['body']); if (isset($result->activated)){ if ($result->activated){ //echo '

3XSocializer plugin activation

'; //echo "

Thank you! Your plugin activated! Please refresh page and use it!

"; $wpdb->update($this->tbl_3x_settings, array('app_key' => $licence_key, 'licence_type' => $product_id, 'app_email' => $email, 'activated' => true), array('id' => 1)); echo "
Thank you — Your plugin is now activated and ready to use.
"; } else { // echo '

3XSocializer plugin activation

'; echo "
Not activated.
Error message: ".$result->error."
"; // echo '
'; } } else { echo '

3XSocializer plugin activation

'; echo "Not activated. Unknown error.
Try one more time"; } } $settings = $wpdb->get_row("select * from ".$this->tbl_3x_settings." where id=1"); ?>

License management

License status

activated){ $status = null; $args = array( 'wc-api' => 'software-api', 'request' => 'check', 'email' => $settings->app_email, 'licence_key' => $settings->app_key, 'product_id' => $settings->licence_type ); $base_url = 'http://3xsocializersoftware.com/'.add_query_arg( 'wc-api', 'software-api', ''); $target_url = $base_url . '&' . http_build_query( $args ); // echo $target_url; $data = wp_remote_get( $target_url ); $result = json_decode($data['body']); // var_dump($result); if (isset($result->success)){ if ($result->success){ $status = "Valid"; } else { $status = "Invalid"; } } else { $status = "Invalid"; } echo "Licensed to: ".$settings->app_email."
"; echo "Product ID: ".$settings->licence_type."
"; echo "License key: "; echo "plugin_url."/images/".($status == "Valid" ? "tick" : "cross")."_icon.png\">
"; } else { echo "Please, activate plugin using form below"; } ?>

Update your license status

Your email
Your key
Product id