• Resolved gratts

    (@gratts)


    When sending data through WP Fusion to Brevo, dates are not sent, looking at the Logs below, it looks like the date is read correctly (3rd November 1998) but then gets translated to 1st January 1970 ?

    Array ( [m] => 9 [d] => 3 [y] => 1998 )

    →?1970-01-01

    Do you know how I can fix this ? The data type is set to “date”

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author verygoodplugins

    (@verygoodplugins)

    Hey @gratts ,

    Normally a date would be stored in the database as a “string”, i.e. 1998-09-03. WP Fusion can convert this automatically. It accepts basically any format.

    But in your case, the date is stored as an “array”, so it’s actually three separate pieces of data— the year, month, and date.

    That’s pretty unusual. Do you know what plugin is saving that data?

    Our Bento integration doesn’t currently handle dates in that format. If it’s coming from one of the plugins listed here: https://wpfusion.com/documentation/#integrations, we may already support it in the full version of WP Fusion.

    Another option would be to use the wpf_format_field_value filter to convert the array back into a timestamp. We have some more info on that here https://wpfusion.com/documentation/filters/wpf_format_field_value/#custom-formatting-for-dates

    Best
    Jack

    Thread Starter gratts

    (@gratts)

    Thanks for the information

    The data is saved from the Paid Memberships Pro Plugin with the field type set as “date”

    I’ll have a look at the “wpf_format_field_value” option

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Incorrect formatting of Date sending to Brevo’ is closed to new replies.