Support

Account

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.