Content of the page

Get the plugin to work with ACF date field


Content of the article

Source: https://wordpress.org/support/topic/custom-date-fields/


Customer question:

Hello,

I am trying to get the plugin to work with ACF date field, but it seems not possible. The problem is with date formats – WOOF uses timestamp and ACF uses Y-m-d format in the database.
Is there a way to solve this?


Support:

Hello

Unfortunately not as for filtration it is nessesary integer data. Try hook woof_meta_data_datapicker to change search query, also paly with using meta date type

p.s. maybe this article will help you use ACF data fields as timestamp https://support.advancedcustomfields.com/forums/topic/date-time-picker-should-optionally-save-timestamp/


Customer:

Hi

To solve this issue, I have added a timestamp meta field to the products, then added the timestamp in this field from strtotime(metadata date). You have to setup “something” for new products…

Then, use datepicker with number format, not with date format.Filtering works.

There seems to exist a layout bug when using datepicker, I will open a new thread for this bug.

Kind regards


Support:

Hello

Ok! Thank you for cooperation!

Faster WordPress Hosting