Hello, I’m looking to develop a wordpress plugin for getting data from M2Web to Wordpress for a a simple dashboard. Some help with this plugin would be much appreciated. I have read through the php documentation for the api, but haven’t been able to come up with the proper wizardly incantation to make it work. attached is the wordpress plugin code structure. I want to just call the data in php and reload it every second. `<?php
/*
Plugin Name: EWON DATA
Plugin URI: http://solvedsystems.com
Description: Retrieve EWON DATA
Author:XX
Version: 1.0
*/
defined(‘ABSPATH’) or die (‘Unauthorized Access!’);
add_action(‘admin_init’,‘callback_function_name’);
function callback_function_name(){
echo’You are now logged into the admin area’;
}
$url = ;
$response = wp_remote_get ($url,
array(
'method' =>'GET'
)
);
if(is_wp_error($response)){
$error_message = $response->get_error_message();
echo"Something went wrong:$error_message";
}
echo ‘
’;’;
var_dump(wp_remote_body($response));
echo’
}`