WordPress and Meetup plugins the never ending story

After Meetup.com and WordPress had significant updates, the plugins pulling meetup information ceased to work. Luckily meetup has a well documented API which allows to retrieve meetup information.

$request = wp_remote_get( ‘https://api.meetup.com/p……
$body = wp_remote_retrieve_body( $request );
$data = json_decode( $body, true );

which can pull the data from meetup and make it easily accessible via a little custom shortcode.

Only – not to forget to set the second parameter to ‘true’ to convert it into an array if this is the plan, otherwise you will get an PHP Fatal error: Uncaught Error: Cannot use object of type stdClass as array in /…..

$data = json_decode( $body, true );

 

 

 

Share or print