Action_Scheduler\Migration
Controller::get_migration_config_object
Get the default migration config object
Method of the class: Controller{}
Hooks from the method
Returns
ActionScheduler\Migration\Config.
Usage
$Controller = new Controller(); $Controller->get_migration_config_object();
Controller::get_migration_config_object() Controller::get migration config object code WC 10.7.0
public function get_migration_config_object() {
static $config = null;
if ( ! $config ) {
$source_store = $this->store_classname ? new $this->store_classname() : new \ActionScheduler_wpPostStore();
$source_logger = $this->logger_classname ? new $this->logger_classname() : new \ActionScheduler_wpCommentLogger();
$config = new Config();
$config->set_source_store( $source_store );
$config->set_source_logger( $source_logger );
$config->set_destination_store( new \ActionScheduler_DBStoreMigrator() );
$config->set_destination_logger( new \ActionScheduler_DBLogger() );
if ( defined( 'WP_CLI' ) && WP_CLI ) {
$config->set_progress_bar( new ProgressBar( '', 0 ) );
}
}
return apply_filters( 'action_scheduler/migration_config', $config ); // phpcs:ignore WordPress.NamingConventions.ValidHookName.UseUnderscores
}