Tell us what you are trying to do?
Import all of the toolset custom fields via WP All import, when importing the date fields as UNIX timestamps they do not get inserted in the Data fields of the posts that I want to update.
Hello. Thank you for contacting the Toolset support.
As you may already informed that Types date fields stores the value of date as Unix Timestamps. Having said that you will have to convert the date string to equivalent Unix Timestamp before you import the csv file.
Can you please try to convert your date column string value to Unix Timestamp for your CSV file and then try to import it and check if that works for you.
Can you please share what XML file you are trying to use as well as if you can share staging site with admin access details.
*** Please make a FULL BACKUP of your database and website.***
I would also eventually need to request temporary access (WP-Admin and FTP) to your site. Preferably to a test site where the problem has been replicated if possible in order to be of better help and check if some configurations might need to be changed.
I have set the next reply to private which means only you and I have access to it.
I ran a quick test on my own local site to see if Types date fields imported correctly, and it didn't work correctly (it *did* import a value, but the value stored in wp_postmeta was not the same as the value in the import file).
We need to investigate this further to see if we can spot what the problem is, so I'm escalating this, and we'll get back to you once we've had a chance to investigate more fully.
Note, the Types add-on for WP All Import Pro is created and maintained by WP All Import.
The problem occurs because the Types add-on of the import plugin converts dates from the import file into timestamps for Types date fields, without first checking if it is already a timestamp.
As mentioned previously, the add-on is managed by the WP All Import team, and so you may want to contact their support to request a fix.
In the meantime you can make the following change to their plugin to avoid the problem.
Update the file wp-content/plugins/wpai-toolset-types-addon/src/fields/fields/FieldDate.php and change the definition of the getFormattedValue function (line 70) like so:
protected function getFormattedValue($date){
if ( !is_numeric($date) ) {
$date = strtotime(trim($date));
}
return $date;
}