Home › Forums › Backend Issues (wp-admin) › Trying to integrate acf_form() into WooCommerce Checkout › Reply To: Trying to integrate acf_form() into WooCommerce Checkout
I’ve never worked with something like this but I am assuming that it is what you suspect. The values are probably being save to whatever post is being created by the plugin you mentioned.
The way I would work around this issue is to create either an acf/save_post filter or a WP save_post filter. The reason I say either is because I’m not 100% sure that the acf/save_post action will fire given the way you’re using the ACF field. Thinking about this it would be better if it’s possible to do this using an acf/pre_save_post filter, but again, I’m not 100% certain that this action will fire either. You’ll need to do some testing so see which filter you can use.
I’d start with acf/pre_save_post https://www.advancedcustomfields.com/resources/acf-pre_save_post/
and then try acf/save_post https://www.advancedcustomfields.com/resources/acfsave_post/
and if both of those fail I’d move on to WP save_post https://codex.wordpress.org/Plugin_API/Action_Reference/save_post
In the filter I’d get the values that are being saved to the post and update the values to the user.
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.