function maybe_clear_migrate_option($processed_items)
{
foreach ((array) $processed_items as $item) {
// First, is this item a jetpack_sync_callable action? If so, then proceed.
$callable_args = is_array($item) && isset($item[0], $item[1]) && 'jetpack_sync_callable' === $item[0] ? $item[1] : null;
// Second, if $callable_args is set, check if the callable was home_url or site_url. If so,
// clear the migrate option.
if (isset($callable_args, $callable_args[0]) && ('home_url' === $callable_args[0] || 'site_url' === $callable_args[1])) {
Jetpack_Options::delete_option('migrate_for_idc');
break;
}
}
}