PluginProbe
SupportCandy – AI Customer Support Ticket System & Live Chatbot Agent / 3.5.4
SupportCandy – AI Customer Support Ticket System & Live Chatbot Agent v3.5.4
3.5.4 3.5.3 3.5.2 3.5.1 3.4.9 3.5.0 3.4.8 3.4.7 trunk 2.3.1 3.3.6 3.3.7 3.3.8 3.3.9 3.4.0 3.4.1 3.4.2 3.4.3 3.4.4 3.4.5 3.4.6
← All changes | includes/class-wpsc-sc-upgrade.php +0 -59 3.4.3 → 3.5.4 View file →
@@ -620,65 +620,6 @@
620 620 WPSC_Scheduled_Task::destroy( $task );
621 621 return;
622 622 }
623 623 }
624 -
625 - /**
626 - * Move deleted tickets to archive
627 - *
628 - * @param WPSC_Scheduled_Task $task - task object.
629 - * @version 3.4.1
630 - * @return void
631 - */
632 - public static function archive_deleted_tickets( $task ) {
633 -
634 - $items_per_page = 10;
635 - // Check if task has pages.
636 - if ( ! $task->pages ) {
637 -
638 - $tickets = WPSC_Ticket::find(
639 - array(
640 - 'items_per_page' => $items_per_page,
641 - 'page_no' => 1,
642 - 'is_active' => 0,
643 - )
644 - );
645 -
646 - // If no tickets found then destroy the task.
647 - if ( $tickets['total_items'] === 0 ) {
648 - WPSC_Scheduled_Task::destroy( $task );
649 - return;
650 - }
651 -
652 - // Save total pages of the task.
653 - $task->pages = $tickets['total_pages'];
654 - $task->save();
655 - }
656 -
657 - // Get tickets for the current page.
658 - $tickets = WPSC_Ticket::find(
659 - array(
660 - 'items_per_page' => $items_per_page,
661 - 'page_no' => $task->pages,
662 - 'is_active' => 0,
663 - )
664 - );
665 -
666 - // save remaining pages of the task. it will be used in ui section.
667 - $task->pages = $task->pages - 1;
668 - $task->save();
669 -
670 - foreach ( $tickets['results'] as $ticket ) {
671 -
672 - $ticket->is_active = 1;
673 - $ticket->save();
674 - WPSC_Individual_Ticket::$ticket = $ticket;
675 - WPSC_Individual_Ticket::archive_ticket( $ticket );
676 - }
677 -
678 - if ( ! $task->pages ) {
679 - WPSC_Scheduled_Task::destroy( $task );
680 - return;
681 - }
682 - }
683 624 }
684 625 endif;