Support

Account

Home Forums Add-ons Repeater Field Using ACF with woocommerce to update order total

Unread

Using ACF with woocommerce to update order total

  • 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.

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 Cookie Policy. If you continue to use this site, you consent to our use of cookies.