Hi there. I am attempting to get ACF values in a repeater … that includes some totals for “custom line items” type system I have set up when creating a Woocommerce order. My issue is I need to update the order total , which I have working once the order is created.. but I need it to run through these BEFORE the order is created because the quote for the order gets created and the order total is 0 because the ACF values are not saved as soon as the order is created. I hope that makes sense. The real question is I have a function that runs when clicking the recalculate button, I would like to save the ACF values on click. I have found forums talking about using : “ if ( !isset($_POST[‘acf’][‘field_5bd0266e9f955’]) ) :
$value = get_field(‘event_startingdate’);
update_field(‘event_endingdate’, $value);” to get the ACF values but A) I don’t understand where field_5bd0266e9f955 is coming from and B) I don’t know if this POST method will work for repeater rows and subfields.
Viewing 1 post (of 1 total)
You must be logged in to reply to this topic.
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Clients need flexibility. Developers need a repeatable workflow that doesn’t have a steep learning curve. See how digital marketing agency Noiza found both with Advanced Custom Fields in our latest case study.https://t.co/BxQAy6COJt