Hello! Great! I did it. you need to replace the code from line 311 to 318 with the following:
$post_arg = [
'ID' => $listing->get_id(),
'post_status' => 'publish',
'post_date' => current_time('mysql'), // Update publication date to the current one
'post_date_gmt' => get_gmt_from_date(current_time('mysql')), //Update date in GMT
];
$updatedListingId = wp_update_post($post_arg);
if (is_wp_error($updatedListingId)) {
return $updatedListingId;
}
But for some reason, after clicking the Refresh button, I get the message “Your listing has been updated” and I need to refresh the page to see the new date on the listing. Don’t know how to fix it?
Ali Akbar, I think you need to change this function in future updates, as it will be logical and correct if it works this way! This works like this on all ad sites I know!
Also on other sites, activation and renewal of an expired advertisement with updating the publication date is paid! It would be good if you thought about this feature! Thanks for your help!
Please also check ticket ID# 88895. I would like to speak with you personally about this.