Will have to make more changes now.
);
}
+ /**
+ * markQueueProcessed
+ *
+ * Mark queue row as processed with the current datetime.
+ *
+ * @param mixed $queue_id Id for the queue.
+ *
+ * @access public
+ * @return void
+ */
+ public function markQueueProcessed( $queue_id )
+ {
+ $this->wpdb->update(
+ GLM_MEMBERS_BILLING_PLUGIN_DB_PREFIX . 'notification_queue',
+ array( 'processed_time' => date( 'Y-m-d' ) ),
+ array( 'id' => $queue_id ),
+ array( '%s' ),
+ array( '%d' )
+ );
+ }
+
/**
* deleteQueue
*
if ( isset( $queued ) && !empty( $queued ) ) {
foreach ( $queued as $queue ) {
$Notifications->sendEmailNotification( $queue['notification_type'], $queue['account'] );
- $Notifications->deleteQueue( $queue['id'] );
+ $Notifications->markQueueProcessed( $queue['id'] );
}
}
wp_die();