<?php

// GET

if ( ! function_exists( 'wpj_get_cancellations_count_by_order_id' ) ) {
	function wpj_get_cancellations_count_by_order_id( $order_id ) {
		global $wpdb;

		return $wpdb->get_var(
			$wpdb->prepare(
				"
				SELECT COUNT( * )
				FROM {$wpdb->prefix}job_chatbox
				WHERE ( uid = -8 OR uid = -9 )
					AND oid = %d
				",
				$order_id
			)
		);
	}
}