If you need to disable the auto-assignment function and hence have all new tickets assigned to the default agent (set in the plugin general settings), you can add this constant in your theme’s functions.php file: define( ‘WPAS_DISABLE_AUTO_ASSIGN’, true );
Category: Customization
How to set the product field as mandatory?
If you have enabled multi-products support and want to make the “Product” field in the submission form mandatory, just add the following code snippet to your theme’s functions.php file: https://gist.github.com/julien731/a519956ce9c81542439c Don’t want to write your own code? Then get our Powerpack/Productivity extension which provides a nice, friendly user interface for this feature.
How to change the tickets slug?
By default, all tickets will be accessed through a URL of the type domain.com/ticket/my-ticket-title. If you wish to change the slug ticket to something else, let’s say help, so that your URLs look like domain.com/help/my-ticket-title, you need to add a constant in your theme’s functions.php file as follows: define( ‘WPAS_SLUG’, ‘my_new_slug’ ); After you make this change you will need to… Continue reading How to change the tickets slug?
Customizing the outgoing emails
Unless you’re a developer and you know what you’re doing, the best way to customize outgoing emails with WordPress is to use a plugin like https://wordpress.org/plugins/wp-better-emails/. It affects all emails sent by WordPress, not only the ones from Awesome Support.
How can I change/add/remove the status labels (open, close, etc.)?
Our Custom Status extension allows you to easily add and remove statuses. However, if you would like to write the code yourself read on! Ticket “states” are filtered by the hook wpas_ticket_statuses. The hook passes an array of registered statuses where the key is the status ID and the value is the status label. Adding Custom Status add_filter(… Continue reading How can I change/add/remove the status labels (open, close, etc.)?
How to enable Select2 on select dropdowns?
Since version 3.3, it is now possible to turn any custom fields “select” into a Select2 Dropdown. This is particularly useful for dropdowns with lots of items. Enable it for custom fields It couldn’t be easier to enable Select2 for your custom fields. Simply add the argument select2 => true to any custom field (which type is select or taxonomy). Enable it… Continue reading How to enable Select2 on select dropdowns?
How to Add Custom Checks to the Ticket Submission Process
Example <?php add_filter( ‘wpas_before_submit_new_ticket_checks’, ‘wpas_extra_submission_check’ ); /** * Add extra verifications to the ticket submission process * * @param bool|WP_Error $go The submission authorization status * @return bool|WP_Error */ function wpas_extra_submission_check( $go ) { // Check something if ( 1 !== 2 ) { /** * If the check fails, we create an error to… Continue reading How to Add Custom Checks to the Ticket Submission Process
How to Limit the Number of Concurrently Open Tickets
If you wish to limit the number of tickets a user can have opened at the same time, you can hook into the submission process using the wpas_before_submit_new_ticket_checks filter. Example <?php add_filter( ‘wpas_before_submit_new_ticket_checks’, ‘wpas_limit_concurrently_open_tickets’ ); /** * Limit the Number of Concurrent Open Tickets * * @param bool|WP_Error $go Submission status * * @return bool|WP_Error */ function… Continue reading How to Limit the Number of Concurrently Open Tickets
How To Remove The Close Checkbox From The Front-End
On rare occasions you might want to prevent end users from closing tickets. The easiest way to do that is to remove the checkbox that allows the user to close a ticket. You can use some CSS to do that (though, be warned, this might need adjustment if you have a custom or non-standard theme).… Continue reading How To Remove The Close Checkbox From The Front-End
How To Add Content BEFORE the Subject Line
Here is an example of how you can add some text before the subject line of the ticket form. You can add this code to your theme’s FUNCTIONS.php file or to a custom plugin – a plugin is better since you wouldn’t lose changes when you switch themes. add_action( ‘wpas_submission_form_inside_before_subject’, ‘inside_before_test’); function inside_before_test() { echo… Continue reading How To Add Content BEFORE the Subject Line