I’ve setup an ACF date field (Delivery Date) attached to my WooCommerce orders. When I try to use WP All Export’s (WPAE) filtering options on the date field, it does not seem to be working properly. The indications here are:
1. There is no “newer than” rule, unlike when you use the Order Date element.
2. Regardless of the rule chosen for Delivery Date element, WPAE can’t find any result.
So I’m asking the community for help. If you’ve used an ACF date field in the WooCommerce orders and tried to filter the export in WPAE, how did you get it to work?
I’m running the latest versions of WP, ACF, Woo and WPAE.
Thank you in advance.
The reason that they are stored this way today is backwards compatibility. It’s not possible to switch to standard date formats without breaking every site already using date fields. I think the developer attempted to make this changes when the date/time field was introduced an this is exactly what happened. This goes back to the first version of ACF, I don’t know why this format was chosen at the time.
If you need to have the date fields in the right format to allow searching and sorting them as “dates” what you can do is to create another custom field in WP the normal way using add_post_meta() or update_post_meta(). When a post is saved create an acf/save_post filter that gets the value from the acf date field, converts it to a proper date and then saves the value in the new field. Then you can use this other field instead of the ACF field for whatever you need.
Hey John.. Wow! Thank you for the information.
The idea of passing the data from the ACF date field into a custom field sounds really doable. And I’ll keep that in mind for my next build or website tweak later.
The information you’ve shared is very helpful. Thanks again.
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
Helping others is a great way to earn karma, gain badges and help ACF development!
© 2022 Advanced Custom Fields.