• Resolved imithemes

    (@imithemes)


    I am trying to add some self hosted plugins for few of my theme demos but they never worked. As per my findings, any plugin inside the demo specific condition search the slug on WordPress plugins repository and ignore the source attribute. Any help would be appreciated.

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Author Gregor Capuder

    (@capuderg)

    Hi @imithemes,

    are you using the correct recommended plugins hook and callback, described here?

    Does the extracted zip folder match the slug in the ocdi/register_plugins callback array?

    Take care!

    Thread Starter imithemes

    (@imithemes)

    Thanks for getting back on this. Yes, I am using the correct plugin hook for the demo specific required plugins as shown here:

    if (
        isset( $_GET['step'] ) &&
        $_GET['step'] === 'import' &&
        isset( $_GET['import'] )
      ) {
    	// Adding one additional plugin for the first demo import ('import' number = 0).
        if ( $_GET['import'] === '0' ) {

    But it always display message ‘Plugin not found’. I believe it search for the hosted plugin on the WP repository.

    Plugin Author Gregor Capuder

    (@capuderg)

    Hi @imithemes,

    thanks for letting us know that you are loading recommended plugins conditionally.

    I think we’ll have to update our documentation in the advanced guide.

    Could you please try to specify all plugins from all your theme demos at the top of the callback function (without any conditions)?

    And then you can have the code with conditions based on the selected theme demo. You can overwrite the array that the ocdi/register_plugins callback returns.

    I think the issue is that when the actual AJAX call for the plugin install occurs, the $_GET parameters are not available and the installer AJAX action can’t find the registered plugins.

    With the above change this should be resolved.

    Could you please try that and let us know?

    Thank you and have a nice day!

    Thread Starter imithemes

    (@imithemes)

    Thanks for the information. It seems to be working by overriding all the default plugins in the conditional demo.
    I do have question though, is it necessary to define the source of the plugin in both default and conditional array?

    Plugin Author Gregor Capuder

    (@capuderg)

    Hi @imithemes,

    you can try and remove the source from the conditional array. I think that should also work OK.

    Thank you for testing this and letting us know it works, so we can change the documentation for other users that might come across this issue.

    Take care!

    Thread Starter imithemes

    (@imithemes)

    Yes, removing the source from the conditional array is ok and self hosted plugins works well. I appreciate your assistance.

    Plugin Author Gregor Capuder

    (@capuderg)

    Hi @imithemes,

    thank you very much for confirming this ??

    Have a nice day!

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Self hosted plugins not working in conditional demo’ is closed to new replies.