Home › Forums › General Issues › Custom Field (Woocommerce) value => load as acf deafault_value › Reply To: Custom Field (Woocommerce) value => load as acf deafault_value
please use code tags when posting code.
I’m not sure exactly what you’re doing, but if you want to set the default value of a field then I think you need to use the acf/load_field filter. the acf/update_value runs when before the acf field is saved, not when the field is loaded.
http://www.advancedcustomfields.com/resources/acfload_field/
You can’t change the default value of an ACF field when you’re saving a product in woocommerce.
Also, looking at what I can make out of your code $order->id
has no meaning inside of the function.
$post_id = $order->id;
is setting $post_id to NULL.
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.