If you want to check this inside the some hook, which runs after plugins_loaded hook, it is very simple. Just check some plugin specific constant or function exists or not.
For example, to check WooCommerce we will need to check any WOO constant is defined or not. Or it is enough to check if class WooCommerce exists or not.
But what if you want it to check it before the plugins loaded? In this case you will not be able to check some constant,function, class of the plugin is defined or not, because they are not loaded yet. So we will need some additional trick for that. We can check $wpdb->options table and get the list of active plugins, process it and get the results. Let’s see how it works.
Here is sample code for that:
Backend gets the first requests and does some operation and returns done percentage. (in this sample there should be 10 steps, so each requests completes the next 10%).
Hi, it’s me, Elvin. I am WordPress Developer with >7 years experience and i would like to speak about WordPress. I have already written hundreds posts about WordPress development in several websites, but now i’ve decided to create dedicated weblog for this.
In this blog i will share my custom solutions, approaches, hacks, tricks on WordPress Development.