Menu Close Menu
Menu
  • 0
    • Number of items in cart: 0

      • Your cart is empty.
      • Subtotal: $0.00
      • Estimated Tax: $0.00
      • Total: $0.00
      • Checkout
  • Pricing
    • Purchase Options
    • Individual Extensions
  • Support
    • Documentation
    • Log a Support Ticket
  • Your Account
    • Register
  • Blog

Removing Post Lock from Tickets

Removing Post Lock from Tickets

Enable multiple agents to work on a ticket simultaneously

WordPress locks posts whenever they are accessed in order to prevent multiple users from accessing and modifying the post at the same time.

This can be a hindrance to a support organisation and therefore, sometimes, it is necessary to enable multiple people to access and work on a ticket at the same time.

Post Lock

Remove the Post Lock from Tickets

With KB Support, by default, we do not adjust the WordPress post lock feature, however, we have built in functionality for you to easily override this configuration with a single line of code.

Place the following into your functions.php file, or into a custom plugin, to allow multiple agents to view and edit a support ticket simultaneously.

/**
 * Disable the WordPress post lock from tickets
 * to enable multiple support workers to view and
 * edit a ticket at the same time.
 */
add_filter( 'kbs_disable_ticket_post_lock', '__return_true' );

Remove the Post Lock for Support Managers Only

Whilst a single line of code can remove the post lock for everyone, with slightly more advanced coding, it is possible to remove the post lock in certain conditions only.

The following example will remove the post lock for users with the Support Manager role only…

/**
 * Disable the WordPress post lock from tickets
 * to enable support managers to view and
 * edit a ticket at the same time as agents.
 *
 * @param	bool	$remove		True to disable, or false
 * @return	bool
 */
function kbs_example_remove_post_lock_for_managers( $remove )	{

	$current_user = wp_get_current_user();
	$user_roles   = $current_user->roles;
 
	if ( in_array( 'support_manager', $user_roles ) )	{
		$remove = true;
	}

	return $remove;
}
add_filter( 'kbs_disable_ticket_post_lock', 'kbs_example_disable_post_lock_for_managers' );

Was this article helpful?

We're working hard to ensure we provide you with useful and relevant documentation to help you get the most out of KB Support.

Please take a moment to let us know if you found this article helpful.

Removing Post Lock from Tickets

WordPress locks posts whenever they are accessed in order to prevent multiple users from accessing and modifying the post at the same time. This can be a hindrance to a support organisation and therefore, sometimes, it is necessary to enable multiple people to access and work on a ticket at the same time. Remove the Post…
KB Article rating: 4.0 based on 1 ratings
Advanced FAQs Tickets Workflow Last updated: 11/09/2017

Published by Cristian Raiber

Posts by Cristian Raiber

Post navigation

Previous

Assigning Multiple Agents to a Ticket

Next

Configuring Reply Approvals

Contact Details

  • Follow us on Twitter
  • Like us on Facebook
  • Fork us on GitHub

Developer Resources

Plugin Boilerplate

Trello Board

GitHub Repository

Ratings & Satisfaction Docs

  • Configuring Ratings and Satisfaction
  • Advanced Settings

Email Support Docs

  • Plugin Requirements
  • Configuring Email Support
  • Creating New Tickets
  • Replying to Closed Tickets
  • Anonymous Replies in Email Support
  • HTML Emails Tags
  • Email Commands
  • Defining IMAP Flags

KBS REST API Docs

  • Using the REST API
  • Tickets REST API Route
  • Replies REST API Route
  • Articles REST API Route
  • Agents REST API Route
  • Customers REST API Route
  • Companies REST API Route
  • Forms REST API Route
  • Form Fields REST API Route
  • Ticket Categories REST API Route
  • Ticket Departments REST API Route
  • Ticket Source REST API Route

Article Categories

  • Configuration
    • Advanced
    • Getting Started
  • Developer Docs
    • Constants
    • Hooks
  • Extensions
  • FAQs
© 2023 KB Support. All rights reserved.
  • Blog
  • Shop
  • Support
  • Privacy Policy
  • Discount Code