Since the standard redirection works, I figured the conflict must be with TGM plugin activation already hooking to activated_plugin
and producing output and thus preventing the redirect…
Therefore the solution was to ensure that the plugin activation function hook was added to an earlier priority than the (silent) default of 10 most probably used by TGM:
add_action( 'activated_plugin', 'activation_redirect', 9 );
Related Posts:
- Force plugin to fail activation
- Unable to activate wordpress importer after installing it
- Apparent errer when installing plugin
- Modifying server’s response to API endpoint
- Problems with installing and deleting plugins
- Uninstall, Activate, Deactivate a plugin: typical features & how-to
- How To Activate Plugins via Code?
- Activate a plugin through PHPMyAdmin or FTP?
- How to catch/what to do with a WP Error Object
- An unexpected error occurred. Something may be wrong with WordPress.org or this server’s configuration
- How to check if a theme is active?
- What are the best practices for updating?
- Is there a plugin that will override the “Error establishing a database connection” message? [closed]
- Error: call_user_func_array() expects parameter 1 to be a valid callback
- How to eliminate weird 404 errors in wp-admin?
- Loading external page template and enqueue script from plugin causes 403 forbidden error
- Validation error: Extending Gutenberg gallery block
- How do I force wp_enqueue_scripts to load at the END of ?
- Pluggable function and activation check?
- How do I make my plugin load before the headers are output so I can redirect wordpress?
- How do I fix the “sorry, you are not allowed to access this page” error I get on the “plugins > settings” links?
- Should messages in WP_Error already be html escaped?
- Automatically install wordpress plugin at theme activation
- Show a confirm message before plug-in activation
- How to get Login Error messages on a custom template
- Add code into on a per page/post basis
- PHP Deprecated: Non-static method should not be called statically
- Function to activate WordPress theme inside a plugin
- How to remove/hide action links cluttering under specific plugins’ names
- Plugins error (Use roles and capabilities instead) on latest version, multisite
- WordPress error – PHP Fatal error: Uncaught Error: Call to undefined function register_block_type_from_metadata()
- Activate Plugin which is in subfolder?
- Error: “Cannot modify header information”
- Change My Basket text in the header of WooCommerce Artificer theme
- Plugin.php: PHP Notice: Undefined offset: 0 in
- Why am I sometimes getting a 404 error when I try to update a page with Elementor?
- check for the current screen
- “Are you sure you want to do this?” when deactivating all plugins in WordPress 4.3.1 [closed]
- explanation for activate_plugin function in wordpress core
- Remote plugin activation hook
- How to send “Location” header on plugin form submit event?
- Meteor Slides as header only for homepage and Use featured image of each page as header for respective pages
- How should I handle errors within a plugin?
- An Unexpected HTTP Error occurred during the API request
- WordPress register_activation_hook table creation not working
- Multisite: Activate plugin for subsites only?
- The plugin generated x characters of unexpected output, $wpdb not defined
- Correct way to use register_activation_hook
- Strip HTML comments from plugins in header/footer
- Dashboard Disappears after Upgrade
- How do you install the automattic developer plugin under localhost for mamp when there is an error, deprecated?
- Why Better WP security plugin returns 418 I’m a Teapot “error”?
- echo do_shortcode is not working on theme’s template
- Seaweed Plugin not working
- send_headers don’t work on wordpress multisite
- Cannot run the code after I activate the plugin
- All plugins deactivated due to error
- How can I see the error generated by plugin activation?
- wordpress in nginx docker container connected to php:8-fpm container and mariadb container isn’t creating any tables on plugin activation
- Weird problems after recovery from security breach
- How to include plugin without activation?
- Auto add content such as pages upon plugin activation?
- Error in the wp-config.php file: PHP Fatal error: Uncaught Error: Unknown named parameter (PHP 8.0)
- How to implement Sentry on WordPress? [closed]
- Detect when any plugin is activated or deactivated
- How to automate wordpress plugin activate and deactivate by php logic?
- Can a plugin still effect a site even after deletion?
- Accessing GET variable named ‘error’
- Error handling a plugin with exceptions
- adding meta data using plugin to top of head
- Default Plugin Settings Not Writing to Database
- Plugin won’t activate – cannot declare class (already in use)
- Unable to install theme recommended plugins on Multisite
- Plugin Deactivate Self on Activation Errors
- How to activate plugins for my WordPress sites from a remote server
- Problem with wordpress version 3.8
- register_activation_hook with include file [closed]
- Prevent a plugin from being automatically activated
- Post-terms-order PHP errors after update
- WordPress Redirect Not Working – AJAX Callback Response Not Picked Up
- Is any information available in PHP files in WP about plugin activation history?
- Call to undefined function get_userdata in user.php
- Only Homepage not loading properly
- Accidentally Broke Site (Please Help) [closed]
- One of my plugins broke when I tried to update it, how do I safely uninstall it?
- Images not showing after changing wp-content folder name
- Headers already sent when I try to add headers via a shortcode
- Activated plugin is stored as an object, rather than as a path
- Own plugin corrups plugin-activation
- WooCommerce Checkout Error [closed]
- WordPress repository forbids me call wp-load.php in non-WordPress file
- qTranslate conflicts with SEO-plugins [closed]
- CSV file generation failing
- Plugin: Google Analytics for Dashboard error – Timestamp is too far from current time
- Show an image in my header.php
- How to redirect a URL with parameters?
- Problem using Press-this book marklet
- Headers Content-Security-Policy CSP Major Issue
- Python with wordpress plugin
- How to debug error message: Cannot modify header information