I have a wp plugin that I am using to inject the php file for the cookie banner along with the styling. It has been working up until recently not sure if this has been a persistant bug however it is no longer adding the html to the footer. It is however still adding the styling etc.
The function I have used to insert the html from a secondary php file in the plugin directory is as follows:
function cookie_callback()
{
$asubHTML = file_get_contents(plugins_url('/views/cookie-banner.php', __FILE__));
echo $asubHTML;
}
add_action('wp_footer', 'cookie_callback');
Could someone assist on this issue as I am a little miffed as to why its suddenly broken.
Loading the html directly in the footer works perfectly but I would want to decouple the inline html from the site outside of the plugin ideally.