Last active
March 30, 2025 18:06
-
-
Save the-sufi/9bd31fff253843c512bd465c0f198953 to your computer and use it in GitHub Desktop.
WHMCS Client Area Ticket View - Show Oldest Reply First
This file contains 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 characters
<?php | |
/** | |
* code goes inside "includes/hooks" directory | |
*/ | |
/** | |
* Client Area Ticket View - Show Oldest Reply First | |
* @param $vars | |
* @return array | |
*/ | |
function dctit_clientarea_view_ticket_sort($vars) { | |
//by default Six template is using $descreplies variable to show tickets/replies in client area. | |
//this shows latest reply first. it returns the value of $vars['descreplies']. | |
//to show oldest reply first, $descreplies is replaced with $vars['ascreplies'] | |
return array ( 'descreplies' => $vars['ascreplies'] ); | |
} | |
add_hook("ClientAreaPageViewTicket", 1, "dctit_clientarea_view_ticket_sort"); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment