Process_Worker_Service::restore_event_recurrence_meta()
Restore the _EventRecurrence meta to the original value if the strategy applied to an Event modified it.
Return
(void) The method does not return any value and will have the side effect of restoring the _EventRecurrence meta to its pre-migration value.
Source
File: src/Events_Pro/Custom_Tables/V1/Migration/Process_Worker_Service.php
public function restore_event_recurrence_meta() {
global $wpdb;
$wpdb->query(
"UPDATE $wpdb->postmeta pm
JOIN $wpdb->postmeta pm_backup
ON pm.post_id = pm_backup.post_id
AND pm_backup.meta_key = '_EventRecurrenceBackup'
SET pm.meta_value = pm_backup.meta_value
WHERE pm.meta_key = '_EventRecurrence'"
);
$wpdb->query( "DELETE FROM $wpdb->postmeta WHERE meta_key = '_EventRecurrenceBackup'" );
}
Changelog
| Version | Description |
|---|---|
| 6.0.0 | Introduced. |