check_path = $check_path; $this->pid = $pid; } /** * Return the status of the plugin licensing * @return boolean $remote_license */ public function getRemote_license($key="") { $key = $key ? $key : get_option( 'elecs-license-key', ''); $request = wp_remote_post($this->check_path, array('body' => array('action' => 'license', 'key' => $key, 'pid'=>$this->pid))); if (!is_wp_error($request) || wp_remote_retrieve_response_code($request) === 200) { return $request['body']; } return false; } }