Why is WordPress function undefined when adding a shortcode?
We would like to add a custom function of a shortcode in wp_include/functions.php. This is the function: function url_id() { $apiUrl = 'https:exampleurl.api.com/exemple123'; $response = wp_remote_get($apiUrl); return wp_remote_retrieve_body($response); } add_shortcode('session_id', 'url_id'); But we were getting this error: There has been…