Home Forums General Issues ACF Date picker + Woo + WP All Export


ACF Date picker + Woo + WP All Export

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

  • Date fields do not store dates in standard date format. They are stored in the format “YYYYMMDD”. You will run into issues if you try to treat these values like dates.


    I was finally able to filter the orders using that suggested format.

    For knowledge purposes and curiosity..

    What sort of issues would be encountered if the date field values were stored as dates?

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

Viewing 5 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic.