code-pixelz-media / locatepress

GNU General Public License v2.0
0 stars 0 forks source link

Remove cURL functionality #7

Open cpmrohit opened 3 years ago

cpmrohit commented 3 years ago

Remove cURL being used in to retreive plugin addons data. Instead use https://developer.wordpress.org/plugins/http-api/

cpmraman commented 3 years ago

removed cURL functionality and replced it with

        $response = wp_remote_get($url);

                   if( is_wp_error( $response ) ) {
            return false; 
        }

        $body = wp_remote_retrieve_body( $response );
        $addons = json_decode( $body, true );