Home › Forums › General Issues › Update ACF field when WooCommerce order status switched to “Processing” › Reply To: Update ACF field when WooCommerce order status switched to “Processing”
So basically we have this field which is shipping number (order_shipping_number)
that is normally updated manually through manual input on the order page.
This field is normally updated before the order status is switched to “Completed”.
On some ocasions, users will select different shipping methods,
based on these shipping methods I am not updating the shipping number (order_shipping_number)
automatically/programatically when it is set to “processing” (meaning the user has paid the order, so sometimes “Processing” is also switched automatically by the payment processors)
(I use “woocommerce_order_status_processing” because this is the stage when customer has officially paid for the order.) so that there doesn’t need to be a manual input anymore but this is only for 40% of the orders. So the value still needs to be updated or changed manually sometimes, before the order is set to “completed”.
So I understand that WP save_post hook fires after “woocommerce_order_status_processing”, overwriting the “update_field” that happened.
But I admit I am not sure what would be the best practice to follow here given this situation
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.