Should I not update the plugin?

There are several points which should be clear when starting such a project. WordPress is constantly updating, think about extra layer protection through updates or changes in the GUI. (meaning by that, updating core files) A plugin relies on WordPress core, which need to be updated also when there are changes which can cause conflicts. … Read more

Check if plugin exists/active “class_exists()” does not work on plugin territory

Woo Commerce provides code to check to see if WooCommerce is installed : /** * Check if WooCommerce is active **/ if ( in_array( ‘woocommerce/woocommerce.php’, apply_filters( ‘active_plugins’, get_option( ‘active_plugins’ ) ) ) ) { // Put your plugin code here } If no idea where WooCommerece install then : $all_plugins = get_plugins(); $active_plugins = get_option( … Read more

How to define constant before plugin [duplicate]

Defining constants on the global scope instead of using WordPress hooks, the first plugin loaded (See answer linked by Kero) will get the chance to define the constant. However, you could use some of the API hooks in your plugin, the earliest one possible is plugins_loaded, and then you can set priorities for the callbacks … Read more