Commit 256e3457 authored by Erick Hitter's avatar Erick Hitter
Browse files

If table creation fails during install, or plugin is added to an installed...

If table creation fails during install, or plugin is added to an installed site, create table in limited circumstances
parent aec24320
......@@ -58,6 +58,11 @@ class Events_Store extends Singleton {
// Don't schedule events that won't be run
add_filter( 'schedule_event', '__return_false' );
// In limited circumstances, try creating the table
if ( is_admin() ) {
add_action( 'shutdown', array( $this, 'prepare_table' ) );
}
}
}
......@@ -95,7 +100,7 @@ class Events_Store extends Singleton {
/**
* Create table in non-setup contexts, with some protections
*/
protected function prepare_table() {
public function prepare_table() {
// Table installed
$installed = (bool) get_option( self::DB_INSTALLED_OPTION );
if ( $installed ) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment