@kero the init
hook proved to be way to early, thanks for the bright mind!
The template_redirect
hook works just fine as you mentioned.
Related Posts:
- How I prevent a plugin to be loaded when doing WP-CLI?
- Why is it important to deactivate a plugin before deleting it?
- Run WP-CLI using PHP
- Difference between deactivating, uninstalling, and deleting plugins
- Can’t install local plugin (zip) with wp-cli [closed]
- WP WC CLI – WooCommerce setup store with wp-cli [closed]
- How can I list only sites that use a particular theme or plugin?
- Why would WP-CLI and WP Admin show different list of plugins with updates?
- Error when setting up phpunit tests with wp-cli scaffold
- How to use WP-CLI / WC-CLI to bulk import 1000s of products (variable and simple)?
- How can I list all installed plugins/themes/versions from CLI/API?
- PHP if statement with German umlauts [closed]
- Unable to import complete data remote wp-cli wordpress
- WP-CLI plugin delete command fails silently
- All plugins deactivated. What could cause this?
- Disappearing plugins
- Disable email notification after change of password
- Get a list of all WordPress.org Plugins?
- Schedule WordPress Auto-Updates to only run during business hours
- How do I make my plugin load before the headers are output so I can redirect wordpress?
- Sell one unique item with Woocommerce? [closed]
- Make thumbnails in woocommerce replace the main image instead of opening fancybox
- Why can I not use a class constant as text domain?
- Function to Set Product type in Woocommerce [closed]
- Deactivate plugins using Migrate DB’s find and replace options
- Trying to get logged-in user data inside php class
- Calling function from within functions.php returns unwanted value
- How to remove an Ajax action
- WordPress Plugin Boilerplate – add_action hook in static “activate” function
- add function to saving change on Options Pages
- Opendir and WordPress Path
- Has anyone used require.js for handling plugin scripts?
- Edits to plugin not taking effect
- Multiple files in a plugin
- Gutenberg Blocks – Change EDIT part of the block using editor.BlockEdit filters. How to change the markup?
- Make the checkbox meta field checked by default
- adding a new value to a serialized array in WP_option table
- Remove rewrite rules generated by plugin during deactivation
- How to show Recent Page instead of Post?
- Allow HTML in Excerpts in Elementor
- Problem In Advance search Plugin [closed]
- Calculate price and display on woocommerce product single page under price (simple price, variable price) [closed]
- Classified ad website : which solutions to use? [closed]
- wp_redirect() Error in Custom Plugin
- Front end inline editing?
- Constant Contact plugin forbidden error
- How do I disable an update for a specific plugin?
- changing posts layout in ultimate member profile plugin
- Text only version of website [closed]
- Problems with migrating a WooCommerce orders [closed]
- Get User_id outside wordpress,
- HTTP 500 error after plugin install
- echo statement displayed on front end
- Editing wp-config.php
- Integer in Array returns null
- Change the layout of action links under the plugin names
- How can i add simple code in only in posts by function.php
- Possibility to login without password
- Add user meta after a user has registered and logged In [closed]
- Store plugin page content in wp_options?
- HTTPS connection with wampserver for “Facebook for WordPress” plugin
- Each User has a Personal Blog
- Why are plugin settings not all nested in one place?
- Completely remove ability to create users?
- looking for a multi-user hello-world plugin
- Unable to use custom taxonomy with front end post form
- Replace image urls(absolute instead of relative) by using filter in single page
- WordPress and plugins update
- Links to plugin files not resolving
- Transfer from register plus to register plus redux plugin
- How to search post titles with whole words only, but not the exact word only?
- Can I disable xml-rpc by setting it to false?
- Compare custom field values
- Cron: Update four post at Hour
- submit two file input fields in the same form
- Add post attachment images their links
- elementor development – custom widget like an inner section widget
- Block Google tracking on refuse consent of the user with plugin
- Simulate Update User button click
- Disable plugin for administrator
- Modify Plugin PHP Class in Child Theme – Correct Method
- WordPress wp-admin redirects to home page
- Customize a widget position
- How to add the functionality of WordPress needed to be installed to be mandatory while installing themes
- Admin Logged In Notify Globaly
- Editing Global Variables from Inside Functions
- building custom simple shopping cart using wordpress plugin
- Posting code inside the post instead of in the template file using shortcode
- Very Slow loading. Plugins report provided by P3 included
- Plugin update, is a deactivation and activation done?
- overwrite a plugin function in functions.php
- How to list the categories by custom taxonomy created?
- Allow users to enter and edit data in one-to-many configuration
- How to make is_admin() return false when I need it to?
- Facebook comment into my blog
- Distribute post content through several divs [closed]
- Does anyone have the Custom Post Permalinks plugin from John P. Bloch? [closed]
- contact form 7 captcha support anyother captcha plugin? [closed]
- Tips on using a custom template with Ultimate Member
- How to make a Template page to show the information of different things Shop and Product page?