Home › Forums › General Issues › Replace category name by a ACF value › Reply To: Replace category name by a ACF value
Hello,
I find the answer. You don’t need ACF for that.
You can import these values by:
1) Importing the values as shown here:
2) Adding the following code snippet to the function editor.
function my_custom_field($value, $post_id, $key, $existing_meta_keys, $import_id) {
if ($key == "wc_productdata_options") {
$value = array($value);
}
return $value;
}
add_filter('pmxi_custom_field', 'my_custom_field', 10, 5);
That should do it.
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Privacy Policy. If you continue to use this site, you consent to our use of cookies.