Last active
September 14, 2022 11:13
-
-
Save danielbitzer/1c4857b2d49fc28a66003dc2f08154d4 to your computer and use it in GitHub Desktop.
Revisions
-
danielbitzer revised this gist
Aug 2, 2018 . 1 changed file with 2 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,5 +1,7 @@ <?php // Requires AW 4.3 // create date object $date = new AutomateWoo\DateTime( '2018-07-23 06:12:04' ); -
danielbitzer revised this gist
Jul 27, 2018 . 1 changed file with 0 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -13,7 +13,6 @@ $query->where_order( 1234 ); foreach ( $query->get_results() as $event ) { $event->set_date_due( $date ); $event->save(); } -
danielbitzer created this gist
Jul 27, 2018 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,19 @@ <?php // create date object $date = new AutomateWoo\DateTime( '2018-07-23 06:12:04' ); // get the queued event by ID $event = AutomateWoo\Queued_Event_Factory::get( $event_id ); $event->set_date_due( $date ); $event->save(); // alternatively you can get the event via a query $query = new AutomateWoo\Queue_Query(); $query->where_order( 1234 ); foreach ( $query->get_results() as $event ) { $event = AutomateWoo\Queued_Event_Factory::get( $event_id ); $event->set_date_due( $date ); $event->save(); }