register_activation_hook in mu-plugin not triggering

Question

I have a class setup to run some database scripts on my mu-plugin.

function activate_mjmc_core() {
 require_once plugin_dir_path( __FILE__ ) . 'includes/class-mjmc-core-activator.php';
 Mjmc_Core_Activator::activate();
 Mjmc_Core_Activator::mjmc_database_version();
 Mjmc_Core_Activator::mjmc_companies_table();
 Mjmc_Core_Activator::mjmc_locations_table();
 Mjmc_Core_Activator::mjmc_companies_insert();
}

register_activation_hook( __FILE__, 'activate_mjmc_core' );

Now these work just fine when i use this as a normal plugin where i have to activate it.

But when i use this in my mu-plugins, all the other plugin functions work, it just doenst run the database functions listed above on activate. Is there something else i need to do on these database functions? or run this on another wordpress hook?

thanks

0
, joelanco 11 months 0 Answers 87 views 0

Leave an answer