Use a queued-event ID and a MySQL-formatted UTC date. The helper validates the ID and returns false when the event cannot be loaded.
Developer note:
Add custom PHP in a small custom plugin or child theme, and test it on a staging site before production. This example requires ongoing maintenance when extension APIs change.
functions.php
<?php
/**
* Update the due date for a queued AutomateWoo event.
*
* @param int $event_id Event ID.
* @param string $date_due Due date in Y-m-d H:i:s format.
* @return bool
*/
function my_store_update_queued_event_date( $event_id, $date_due ) {
$event = AutomateWoo\Queued_Event_Factory::get( absint( $event_id ) );
if ( ! $event ) {
return false;
}
$event->set_date_due( new AutomateWoo\DateTime( $date_due ) );
$event->save();
return true;
}
my_store_update_queued_event_date( 123, '2026-09-01 14:00:00' );