Skip to content

Conversations

The conversation system allows vendors and customers to communicate directly on a service order. Messages, file attachments, and status updates are all tracked in a threaded conversation view.

After the customer submits their requirements, the conversation panel becomes available on the service order page. Both the customer and vendor can send messages from this point forward.

Messages are submitted via AJAX (wp_ajax_wss_send_order_conversation):

  1. Navigate to the service order page
  2. Type your message in the conversation input field
  3. Optionally attach files using the attachment button
  4. Click Send

Messages appear instantly in the conversation thread.

Both parties can attach files to conversation messages. Supported file types are controlled by WordPress’s default allowed MIME types and can be filtered using the wss_get_allowed_mime_types filter.

Files can be downloaded through the plugin’s built-in download handler which includes path traversal prevention.

When enabled in settings, the conversation panel uses AJAX polling (via sell-conversation-update.php) to fetch new messages in real time. The polling endpoint:

  • Fetches new messages since the last check
  • Marks received messages as read_status = 1 when the other party views them
  • This read status is important — it prevents the email cron from sending notifications for messages already seen via live conversation

Enable this at WP Admin > Woo Sell Services > General Settings > Enable Live Conversation.

Conversation emails are NOT sent immediately when a message is posted. They use a cron-based delay system:

  1. When a message is sent, it is stored in the database with read_status = 0
  2. A cron job runs every 5 minutes
  3. The cron selects unread messages whose timestamp is older than the configured delay
  4. If the message is still unread (the other party hasn’t seen it via live conversation), an email is sent
  5. If the other user already read the message via live polling, no email is sent

This approach prevents email floods during rapid back-and-forth conversations.

Configure the delay at WP Admin > Woo Sell Services > General Settings > Email Conversation Delay (in minutes).

If a product has a co-author assigned and the co-author notification setting is enabled, the co-author:

  • Receives copies of conversation email notifications
  • Can view the conversation in the admin order view
  • Can be assigned at the product level or at the individual order level

Support agents can be assigned from:

  • The product edit screen (if Enable Support Agent Frontend is on)
  • The WooCommerce order admin via the wss_assign_order_agent AJAX handler

Each new message can trigger:

Notification Recipient
Email (via cron) The other party, after configured delay
Email (vendor copy) Vendor, if author_enabled is set in WC email settings
Live notification Both parties (in-app)
Co-author email Assigned support agent

Messages are stored in the wss_sell_messages custom database table with fields for author, recipient, order, product, message content, timestamp, attachment paths, and read status.