ActionScheduler_Abstract_Schema::schema_update_required()
Determine if the database schema is out of date by comparing the integer found in $this->schema_version with the option set in the WordPress options table
Method of the class: ActionScheduler_Abstract_Schema{}
No Hooks.
Return
true|false
.
Usage
// private - for code of main (parent) class only $result = $this->schema_update_required();
ActionScheduler_Abstract_Schema::schema_update_required() ActionScheduler Abstract Schema::schema update required code WC 9.2.3
private function schema_update_required() { $option_name = 'schema-' . static::class; $this->db_version = get_option( $option_name, 0 ); // Check for schema option stored by the Action Scheduler Custom Tables plugin in case site has migrated from that plugin with an older schema if ( 0 === $this->db_version ) { $plugin_option_name = 'schema-'; switch ( static::class ) { case 'ActionScheduler_StoreSchema': $plugin_option_name .= 'Action_Scheduler\Custom_Tables\DB_Store_Table_Maker'; break; case 'ActionScheduler_LoggerSchema': $plugin_option_name .= 'Action_Scheduler\Custom_Tables\DB_Logger_Table_Maker'; break; } $this->db_version = get_option( $plugin_option_name, 0 ); delete_option( $plugin_option_name ); } return version_compare( $this->db_version, $this->schema_version, '<' ); }