Background of the issue:
I am trying to import a custom content field for my posts on hidden link. Most of the fields are filled except the one that is in a custom block with ACF WYSIWYG Editor.
Symptoms:
Unable to import CSV with WP All Import to fill ACF custom content block.
Questions:
How can I import a custom content field using WP All Import for a custom block with ACF WYSIWYG Editor?
I found out that the content is updated in the post_meta table a field of content is created with the translations from the csv, however, I am using ACF Gutenberg blocks and they are in the post table content column and it is not updated.
While you wait for my colleague to take over the ticket, let me try to help you with the issue quickly.
As I understand issue also happens in the default language, can you please confirm if you have the same issue when wpml is disabled and you import in the default language? If yes, then this is not a WPML issue, and you should contact WP All Import for support and further info on how to achieve what you are trying.
<?php
/**
* Converts specific special characters in a string to Unicode escape sequences,
* and shows where newlines and carriage returns should be.
*
* @param string $text The input text to convert.
* @return string The text with special characters replaced by Unicode escape sequences.
*/
function convert_special_chars_to_unicode($text) {
// Define an array of special characters to replace with their Unicode escape sequences
$replacements = array(
' '\\\u003c',
'>' => '\\\u003e',
'"' => '\\\u0022',
"'" => '\\\u0027',
'{' => '\\\u007b',
'}' => '\\\u007d',
'&' => '\\\u0026',
'\\' => '\\\\\\u005c'
);
// Initialize the result string
$escaped_text = '';
$length = mb_strlen($text, 'UTF-8');