You can use register_activation_hook(). Add this to your plugin, tested and works.
register_activation_hook(__FILE__, 'redirect_after_activation');
function redirect_after_activation() {
add_option('redirect_after_activation_option', true);
}
add_action('admin_init', 'activation_redirect');
function activation_redirect() {
if (get_option('redirect_after_activation_option', false)) {
delete_option('redirect_after_activation_option');
exit(wp_redirect(admin_url( 'wp-admin/admin.php?page=axl_ads' )));
}
}
Related Posts:
- Save and retrieve custom plugin options value
- Is it ok to call get_option without hooks?
- Settings API – input always updates over validation
- Serialize data for wp options
- Add Plugin options as subpage to Theme options page
- Create tabs in admin options page from custom post type loop
- Plugin Options not being output
- Gathering and logging data from a plugin: how to do it without race conditions?
- CMB2 – array_search or in_array from repeat_group and comma separated values
- wp_options not returning value for logged out users?
- how to show new field if option selected?
- How to store multiple instances of the plugin’s options for various shortcodes
- Plugin options not appearing on options page using tabbed navigation
- Include paths and functions for external scripts
- Does the number of downloads displayed for a plug-in in the WordPress.org plug-in directory include automatic updates?
- How to get home page ID?
- How to get the active theme’s slug?
- WordPress plugin executing code twice
- How to Override a Pluggable Function
- admin-ajax returning 400 error when request is made with Fetch API
- Which method is best to enqueue scripts
- Removing blank spaces from scripts to reducing page load time
- How to override a theme function (within a class) using a plugin
- Is there a WordPress Plugin that allows voting “does this coupon work” on specific links like Retailmenot
- Don’t send notification if author comments his own post plugin help?
- Custom interval is not working
- Built in admin ajax hooks?
- dequeue not work
- ‘Easy Table’ Plugin has float issues
- Can anyone identify this like plugin (not facebook like)?
- what the hook for displaying course list page for learndash plugin? [closed]
- Copyright messages for a particular set of pages
- Feature Differences between WordPress.com and Hosting on your Own Server?
- How do you add custom logo to entire themes
- wp_get_environment_type is undefined
- Is the wordpress user-model changed in wpmu?
- Dynamic CSS Vs Inline Issues in Code any Way around in a WordPress Themes?
- How to determine if a plugin affects your file-system
- How do plugins get executed automatically from wp-content?
- Force CSS and JS loading of plugin only where needed
- Solutions to repost categories into multisite blogs?
- how to find and correct plugin query performance issues
- Custom random quote widget breaks when used in multiple sidebars
- Building plugin with changeable custom post type values…advice needed
- Hooking in to replace the Sidebar/Widget areas
- Problem with $wpdb
- Is it wise to add plugins to the Object Cache?
- Why namespaces are rarely used in WordPress plugins?
- Remove ‘Check Compatibility’ from Plugins menu
- Uninstalling plugins across all sites
- WordPress “Categories to tags converter” not working. Pointing to import.php instead
- Elementor: How to override global theme style settings? [closed]
- Add user role to generated plugin
- Modify page title and subtitle with a plugin
- override filter in a plugin
- Setting Email locale before retrieving gettext translations
- Is there a maximum length to a WordPress Page?
- Clear out old images, any advice?
- problem with sql query
- Add a “View all” button on WooCommerce product archives pages
- I am trying to make a field show and save from quickedit screen
- What goes into wp_postmeta and why?
- Woocommerce product info in a sidebar?
- output the debug lines to the end of the page
- A question of etiquette when forking a plugin? [closed]
- how to request a script more than once in wordpress
- WordPress Plugin for pastimes/participation in contest [closed]
- Plugin to create unlimited custom shortcodes?
- How do I create pages within a WordPress post?
- Ajax 400 error when used inside a plugin
- How to add custom plugin data to the cart in woocommerce using custom button on product page?
- How can I display selected content from a seperate database in an Activity style widget?
- how to show all posts of each category in pages
- Error thrown Call to a member function get() on null
- Allowed memory size of 134217728 … wp-includes/wp-db.php on line 1989
- Pricing Calculator – WordPress
- reminder wp_schedule_event
- Undefined offset: 0 in WordPress after latest version upgrade [closed]
- Make the product page as homepage WooCommerce
- Adding shortcodes to multiple pages with function
- Genesis Child Theme – Customize body
- Media Dialog CSS broken in WP v.5.3.2
- Multiple wordpress installations with same plugin folder (Apache Virtualhost)
- Slide through page effect?
- Get a list of Product Categories inside a loop
- How to update plugins in a distributed wordpress scenario?
- What’s the preferred method of writing AJAX-enabled plugins?
- WordPress API hook
- jquery conflict with widget page
- Automatically add child pages to menu
- Infinite Scroll plugin scrolling truly “infinitely” (i.e. does not recognize end of posts)
- Simple Data Table Update and Page Integration
- How to add a box for list items?
- wp_update_post call really slow when official Facebook plugin is installed
- This plugin throws error on the events page only [closed]
- White Screen When Includding A Folder With PHP Files
- making a simple plugin
- Custom single-product page for product from category x
- Plugins menu not on dashboard
- Free multi dealer rental cars (sign up) [closed]