I am currently working on creating a website and have to pull some constantly changing data from a google sheet. I have already developed a plugin for that and now I need to figure out how to use that shortcode inside of the shortcode for another plugin. (That plugin makes and updates progress bars if you are curious) I can not figure out how to make this work
I know the shortcode of my plugin works on its own and the shortcode for the progress bar plugin works on its own.
My plugin
function sheet_value_shortcode($atts) {
$API = 'REDACTED';
$google_spreadsheet_ID = 'REDACTED';
$api_key = esc_attr( $API);
$location = $atts['location'];
$get_cell = new WP_Http();
$cell_url = "https://sheets.googleapis.com/v4/spreadsheets/$google_spreadsheet_ID/values/$location?&key=$api_key";
$cell_response = $get_cell -> get( $cell_url);
$json_body = json_decode($cell_response['body'],true);
$cell_value = $json_body['values'][0][0];
return $cell_value;
I want it to pull the data from a cell of the spreadsheet and use it instead of having to go in and manually update the number everytime