ActionScheduler::is_class_migration()
Determine if the class is one of our migration classes.
Method of the class: ActionScheduler{}
No Hooks.
Return
true|false
.
Usage
$result = ActionScheduler::is_class_migration( $class );
- $class(string) (required)
- The class name.
Changelog
Since 3.0.0 | Introduced. |
ActionScheduler::is_class_migration() ActionScheduler::is class migration code WC 9.3.1
protected static function is_class_migration( $class ) { static $migration_segments = array( 'ActionMigrator' => true, 'BatchFetcher' => true, 'DBStoreMigrator' => true, 'DryRun' => true, 'LogMigrator' => true, 'Config' => true, 'Controller' => true, 'Runner' => true, 'Scheduler' => true, ); $segments = explode( '_', $class ); $segment = isset( $segments[ 1 ] ) ? $segments[ 1 ] : $class; return isset( $migration_segments[ $segment ] ) && $migration_segments[ $segment ]; }