However, WordPress automatically calls wp_die() if the site does not meet the min. I rather use an admin notice, anything less harsh than wp_die(), but I can't find any info on how WordPress automatically calls wp_die() and is there is a filter to do something else.
This is not possible via the plugin header.
The reason is because to implement this you need to run PHP code, but WordPress does not run your plugins code to get this information. It loads the first few bytes of the main plugin file and manually searches through the result for the plugin header.
Otherwise, if it ran the PHP file to get the value, and you used a PHP feature that wasn't available, the site would crash every time you loaded the plugins page or did an update check.
This also means that even if there was a filter to change this behaviour, your plugin has no way to use it. You would need a second plugin that had already been activated to add the filter and change the behaviour.
You can get halfway by lying in the plugin header to set a very low minimum value, then manually perform the check yourself, however:
- The plugin directory and the plugin page will both report that it is compatible, even though it is not
- you will need to re-architect your plugin so that none of your actual code is in the main file, only the PHP/WP version checker, you'll need to conditionally load files based on the result
- plugin activation failure is used in lots of checks that are now no longer functional
- the end user may not realise your plugin is in a zombie/limbo mode as most WP Admin screens have a lot of notices
- such a plugin would be guaranteed to be rejected by the .org plugin review team, and would be seen as a major red flag to lots of enterprise companies and agencies, if not more
Overall, this is a terrible idea with poor UX, and lots of maintenance and practical consequences. The only way to do this is to lie in your plugin header, but even that will cause problems.