• Jeremy Herve

    (@jeherve)


    Jetpack Mechanic πŸš€

    Hi there!

    I worked on the Jetpack team, and recently noticed that you’re using 2 Jetpack Composer packages in your plugin:

    • Jetpack Assets
    • Jetpack Constants

    First of all, I’m happy to see that, I hope you’re finding those 2 packages useful! πŸ™‚

    I am reaching out to make a suggestion, so your plugin can be fully compatible with other plugins that rely on those 2 packages.

    When using packages that are also used by other plugins on the same site, it is recommended to use the Jetpack Autoloader Composer package as well; it would ensure that when your plugin is installed alongside another plugin that also loads Jetpack Assets or Jetpack Constants, there are no conflicts between the 2 versions.

    If you’d like to implement that on your site, you’d have to do 2 things:

    1. Require automattic/jetpack-autoloader in your plugin’s composer.json.
    2. Load the Autoloader in your plugin’s main file: require_once DIR . '/vendor/autoload_packages.php';

    Things should then work just like before, but your plugin’s users should never run into conflicts with other sites that use those packages.

    If you’d like to implement that in your plugin and need some more help, do not hesitate to reach out by creating a GitHub issue here, or contact us via email and mention this forum thread; I’ll be happy to help you with this!

    The page I need help with: [log in to see the link]

Viewing 1 replies (of 1 total)
  • Plugin Author quadlayers

    (@quadlayers)

    Hello @jeherve

    Thanks for the amazing work you’ve done with the jetpack packages

    Ill check this with the dev team and include your recommendations

    Best regards!

Viewing 1 replies (of 1 total)

The topic ‘Using Jetpack Autoloader’ is closed to new replies.