[wp-trac] [WordPress Trac] #61269: Plugin Dependencies: Add filter to restore auto-redirect after plugin activation

WordPress Trac noreply at wordpress.org
Fri May 24 04:32:22 UTC 2024


#61269: Plugin Dependencies: Add filter to restore auto-redirect after plugin
activation
-------------------------------------------------+-------------------------
 Reporter:  hellofromTonya                       |       Owner:  (none)
     Type:  defect (bug)                         |      Status:  reopened
 Priority:  normal                               |   Milestone:  6.5.4
Component:  Upgrade/Install                      |     Version:  6.5
 Severity:  normal                               |  Resolution:
 Keywords:  needs-testing needs-dev-note has-    |     Focuses:
  patch has-testing-info                         |  administration
-------------------------------------------------+-------------------------

Comment (by kevinwhoffman):

 I agree with @hellofromTonya that we should not conflate the behavior of
 ''how'' a user gets to the URL, which may change, with the purpose of the
 URL, which should not change.

 However, for flexibility in the future, I do recommend naming this
 parameter something more specific such as `onboarding_url` to represent
 the location in which users should be immediately directed to upon
 activation.

 In 6.5.X, onboarding may be accomplished through a redirect. In 6.6+,
 onboarding may be accessed through a new button in the plugin card. Either
 way, plugin developers have shown through their past use of redirects that
 they have a singular URL in mind where they want all of their users to
 begin experiencing their plugin. This parameter would address that need.

 By naming the parameter `onboarding_url` rather than `url`, it also leaves
 the door open for other types of URLs that may be relevant and useful to
 the onboarding framework.

 **Potentially useful URLs to define via this filter**

 - `onboarding_url` - This is the URL being described in this ticket. It is
 where users are directed to upon plugin activation. This URL could
 represent an interactive onboarding wizard (e.g. the WooCommerce setup
 wizard) for initial configuration or a getting started guide that is more
 about education than configuration. Consider a plugin that may not have
 settings or a presence in the admin menu, but would still benefit from an
 onboarding experience. By using the term "onboarding," we clarify its
 purpose without prescribing how users get there (as determined by core) or
 what they do when they get there (as determined by the plugin).
 - `main_url` - This could be used by the onboarding framework to determine
 where users land after onboarding is complete. It is also where users
 would generally thing of as the "home page" for a particular plugin. It's
 where they go to start using a plugin that has already been configured
 (e.g. navigating to "WooCommerce" or "ACF" in the admin menu).
 - `configuration_url` - This is where users go to generally configure a
 plugin over time (e.g. the WooCommerce settings page). Consider a user who
 has already completed onboarding. There may be places in WP Admin where it
 becomes more appropriate to show this general configuration URL as opposed
 to an onboarding experience that is catered to first-time use.

 **Using WooCommerce as an example**

 - `onboarding_url` - `admin.php?page=wc-admin&path=%2Fsetup-wizard`
 - `main_url` - `admin.php?page=wc-admin`
 - `configuration_url` - `admin.php?page=wc-settings`


 To be clear, the concepts of a `main_url` or `configuration_url` are just
 ideas to be explored further in #61040. I'm sharing those possibilities
 here so that others might see the value of naming this parameter
 `onboarding_url`. I believe we know enough about its purpose to make that
 call today, even if we don't know all of the details about the onboarding
 framework to come.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/61269#comment:27>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list