On my install, I see the CRON events running, and I have debug turned on. I can confirm it’s running. I trying to expire a custom post type, and the ExpireType (Draft, Trash, etc.) does not seem to be set when the expire function reads the ExpireType from the database.
I see a few issues going on…
In the postExpiratorExpire() function, these lines run to retrieve the Expire Type:
$postoptions = get_post_meta($id,'_expiration-date-options',true);
extract($postoptions);
This options field is a serialized strong that looks like this:
a:2:{s:10:”expireType”;s:5:”draft”;s:2:”id”;i:1123;}
However that extract function does not seem to be putting the Expire Type value into the $expireType as the code clearly expects.
So instead $expireType is empty so nothing happens and the posts are never expired.
For custom post types (anything other than a post or page, there is a filter “postexpirator_custom_posttype_expire” which runs for custom post types without a proper expireType stored in the post meta field “_expiration-date-options”
So I added this function that fixed my problem by setting the “expireType” to be “draft” for “product” CPT records (other valid values are “private”, “delete”, “trash, “stick”, “unstick”, “category”, “category-add”, or “category-remove”.
function ayg_set_product_expire_action( $expireType, $posttype ) {
if ( 'product' == $posttype ) {
$expireType = 'draft';
}
return $expireType;
}
add_filter( 'postexpirator_custom_posttype_expire', 'ayg_set_product_expire_action', 10, 2 );
It looks like for Posts, that when the expireType is missing that it used “Draft”, but the later code is expecting “draft” (all lowercase). So this may be causing expiration of posts to fail as well, however there is no filter hook on this value, so the above hook will not work. You could edit the plugin directly as a short term fix. Hopefully this gets addressed in a future version though.