We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent bd55a8b commit e4d101aCopy full SHA for e4d101a
projects/packages/jetpack-mu-wpcom/src/features/wpcom-imports/wpcom-imports.php
@@ -125,12 +125,14 @@ function wpcom_imports_enqueue_script() {
125
126
$url = 'https://wordpress.com/setup/site-migration/site-migration-identify?hide_importer_link=true&siteSlug=' . $domain . '&siteId=' . $site_id;
127
128
- wp_localize_script(
+ wp_add_inline_script(
129
'wpcom-importer-entry',
130
- 'wpcomImporterData',
131
- array(
132
- 'wpcomImporterUrl' => $url,
133
- )
+ 'const wpcomImporterData = ' . wp_json_encode(
+ array(
+ 'wpcomImporterUrl' => $url,
+ )
134
+ ) . ';',
135
+ 'before'
136
);
137
}
138
0 commit comments