Support

Account

Home Forums ACF PRO update_sub_field does nothing Reply To: update_sub_field does nothing

  • The post ID is not needed here

    
    update_sub_field('object_price', $newPrice, $r->post->ID);
    

    just like it is not needed here

    
    $projectPrice = get_sub_field('object_price');
    

    In addition to this $r->post->ID in incorrect by your code, this value is probably not defined and it causing update_field() to work incorrectly.