1. PROMO Subscribe our All Access Pass @ 75% OFF & access all our 16+ premium Divi extensions: Divi Block Pro, Carousel Toolkit, etc.LEARN MORE
Dismiss Notice
NEW Divi.Help Pro Carousel AI Toolkit - Magically turn your Divi design into carousel, simply by using our online toolkit. No plugins needed. Now it works with Divi 5 as well!Try our carousel AI toolkit
BEST Divi Block - A revolutionary drag & drop tool to easily mix & match 960+ premade blocks (Light & Dark) to kick start your Divi site design. Special module designs are included as well. Also newly added AI generator & color. Now it works with Divi 5 as well!
Learn More About Divi BlockFree Version ~ 340+ Free Blocks

Divi 4/5 Extension compatibility

Discussion in 'Free Divi Community Forum' started by AndrewBlakeNZ, Jun 25, 2024.

  1. AndrewBlakeNZ

    AndrewBlakeNZ New Member

    Hey everyone,

    So, I have been tasked with creating a custom Divi Extension for one of our clients, however apparently the Divi 4.x API is deprecated, and instead, it is strongly recommend that the Divi 5.0 API is instead used for all new extensions.

    With that in mind, what I am wondering; If I do indeed proceed with the Divi 5.0 API, will the custom extension be compatible with our client's Divi 4.x installation? If so, great!, however, if not, and I am required to proceed with 4.x's API, what are we looking at in regards to updating the custom extension when Divi 5 releases? Will the structure and functionality of the extension remain the same, or, will it need to be rewritten to be compatible with, (and take advantage of) Divi 5?

    Thanks heaps!
    Andrew
     
    1. PRO MEMBER PERKS Divi Mini Cart Pro Plugin - Instantly add 3 different types of mini cart to your Divi site:Learn More
  2. Divi Booster

    Divi Booster Divi Expert

    Hey Andrew,

    The Divi 4.x API isn't deprecated yet - it's the API used in the current version of Divi. The Divi 5.0 API isn't available yet, and it while the Divi 5 public alpha phase seems to be getting close, it will likely be many months, possibly a year or more, before Divi 5 officially releases, replacing Divi 4. Once Divi 5 is released, Divi 4 modules should continue to work, albeit via a slower method than new Divi 5 modules.

    So I'd consider your time frame - if the client needs to be able to use it on a live site in the near future, then you'd probably need to create it using the Divi 4 API - Divi 5 isn't going to be considered production-ready for some time. Otherwise, if it's a less immediate requirement and / or the client is able to run an early alpha / beta release of Divi 5 (which may be missing features / have compatibility issues with various plugins, etc) then you may be able to get away with jumping straight to Divi 5.

    If your client will go for it, you may wish to build it as a Divi 4 extension that can safely be used now, and then as a separate piece of work add Divi 5 compatibility, as per the following tutorials:

    https://devalpha.elegantthemes.com/docs/category/converting-divi-4-module-to-divi-5/

    The main difference between a Divi 4 extension and a Divi 5 extension is that the module settings which were defined using PHP in Divi 4 are now defined using React in Divi 5. While it will probably be possible for you to reuse some of the Divi 4 code in the Divi 5 extension there will also be some fairly significant reworking required (e.g. in terms of how the code is called). It will take a while, though hard to say how long - that will depend on the nature of the extension, your proficiency with React, etc. Point being, converting between the two will be a major piece of work (and learning) and you should make sure your client is willing to pay for it. I'd probably give yourself a week at an absolute minimum, but be prepared for it to take longer.