getLicensed("plugin"); } public function getLicensed(string $type='plugin') { $plugins_request = wp_remote_post("https://internal-devrepo.courselauncher.io/test.php", ['body'=>['site'=>get_site_url() ]] ); if( is_wp_error( $plugins_request ) ) { return false; // Bail early } $plugins_response = json_decode( wp_remote_retrieve_body( $plugins_request )); if ($plugins_response and isset($plugins_response->result)) { return $plugins_response->result; } else throw new \Exception("Invalid return determining licensed plugins"); } public function get(string $item_name): array { // TODO: Implement get() method. } public function isItemLicensed(string $item_name): bool { // TODO: Implement isItemLicensed() method. } }