Try using this code, will definitely help you to remove the persistent nagging of Yoast. Because it works!
function remove_yoast_license_nag_from_admin_page() {
echo
‘<style>
div.yoast-notice-error {
display: none;
}
</style>’;
}
add_action(‘admin_head’, ‘remove_yoast_license_nag_from_admin_page’);