Below is a PHP function you can use in WP All Import to enable custom text mapping anywhere in your import. You would use it in your import field like this:
[my_map({field[1]})]
Where "{field[1]}" would be the correct field name from your file.
The PHP code for the function editor:
function my_map($value) {
$replacements = array(
// YOU CAN ADD OR MODIFY REPLACEMENTS BELOW USING THE SAME SYNTAX
'small' => 'S',
'medium' => 'M',
'large' => 'L',
);
return isset($replacements[$value]) ? $replacements[$value] : $value;
}
Note that the text replacements works on the entire string of text and not individual words. In the above example, "small" would become "S" but "It's a small world" would be unchanged.
Hi again @m-thomson, I just wanted to let you know that I've reached out to the ACF community as well in the hope of help. In case it's useful, here's the post I've made about this challenge in the ACF forum:
https://support.advancedcustomfields.com/forums/topic/mapping-input-string-for-repeater-sub-field/