Warning! You didn’t set your Yoast SEO Premium license key yet, which means you’re missing out on updates and support! Enter your license key or get a license here.
So you are seeing this message in your wordpress admin area and there is no button to hide it. I found some other tutorial / plugin that can solve this problem. like this one.
If you add the code above to your themes functions.php file, it will hide the error generated by Yoast SEO Premium plugin BUT it will hide all div’s that has the class ‘error’ . Do you really want to do that ? Other plugins or options may have the class ‘error’ in it as its a common word. We should not hide them all.
So what you should do ???
lol, actually you need to purchase the license from the developer to support him. But i guess you donot want to buy it right now or just want to test it for a while without seeing the error 😉
Edit this file /wp-content/plugins/wordpress-seo-premium/vendor/yoast/license-manager/class-license-manager.php
Find the following code
and remove it. Right now the codes are in line number 115 to 127. That should solve the problem for now. But remember, if you update the plugin, the changes will be overwritten / lost. Then you will have to find this code again and remove them. If you donot do this hassle, Just buy the plugin and support the developer. He have been doing great work for the wordpress community for years.