MerlinWP
MerlinWP copied to clipboard
Activate plugin base on the demo
Hi! I've multiple demos with the different recommended plugin. Do MerlinWP support this feature? If don't, how can I custom it? Thank you!
Hi @richtabor Thank for your response but I think you didn't understand my question. For example, I have Demo 1 and Demo 2
Demo 1 with required plugin:
- Woocommerce
- Yoast seo
Demo 2 with required plugin
- EDD
- WP Rocket
So How can I define different plugin list to each Demo?
I don't think this is possible in the current setup because the step where you choose which demo to import happens AFTER the step where the plugins are installed, so it has no way of knowing.. , so IMHO the two steps will have to switch places which in itself will create other problems related to importing plugin specific content or configs where the plugin has not yet been installed (ie. Revolution Slider). One thing you could do is disable unnecessary plugins programmatically in the step where the demo is being imported, you should be able to do that.
I think in your tgmpa_register hook to register your plugins you could do a check for the current active theme, and only register the ones you want based on which theme is active.
@JiveDig, I'll let @duongancol confirm that, but I don't think he's talking about different themes, it's the same theme with multiple demos.
If it's different themes, then the tgmpa_register hook would be registering different plugins to begin with. Maybe I'm just not understanding at all.
@aurora-hq understands correctly my idea. It's one theme with different demos. I changed the plugin activation step with Demo selector step, now the user will choose the demo install before choosing the plugin list. I'm finding a way to custom the plugin list base on the demo selected and not success yet.