Hi @kilinkis. Thanks for sharing. I’m using WP All Import and can import the right date using the Unix timestamp as you describe. However, they don’t expire (everything is working when I add a post manually they expire then, just not if I add posts by importing).
I think this is because there’s nothing in the _expiration-date-options field. I’m not sure how to import this when it’s in the a:2:{s:10:”expireType”;s:5:”draft”;s:2:”id”;i:12345;} format because I don’t know what the id will be at the time of importing.
Do you know what would be the best way around this? I’m fairly new to this so working things out as I go along but this one is baffling me.
Do I need to edit the code in the plugin? I can see the following in there:
$opts = array();
$ts = get_gmt_from_date(“$year-$month-$day $hour:$minute:0”,’U’);
// Schedule/Update Expiration
$opts[‘expireType’] = $_POST[‘expirationdate_expiretype’];
$opts[‘id’] = $id;
I can also see function _scheduleExpiratorEvent($id,$ts,$opts) a little further down.
I presume I would change the code that you mentioned in the Schedule/Update Expiration section? If this is the case, do you know what I would need to put under the _expiration-date-options column when I’m importing? Anything at all or would this be catered for automatically with the edited code?
Many thanks in advance to anyone that can help.