<?php
/**
 * @var $oid
 * @var $order
 */

if ( current_user_can( 'manage_options' ) || wpj_get_seller_id( $oid ) == get_current_user_id() || $order->uid == get_current_user_id() ) {
	if ( $order ) { ?>

		<div class="order-notices-wrapper js-order-notices-wrapper">

			<?php if ( $order->payment_status == 'completed' || $order->payment_status == 'cancelled' )
				echo '<style>.order-pending-row-wrapper{display:none;}</style>'; // for page builder

			if ( $order->payment_status != 'pending' )
				echo '<style>.job-order-bt-proof-row-wrapper{display:none;}</style>'; // for page builder

			if ( $order->payment_status != 'cancelled' )
				echo '<style>.order-cancelled-row-wrapper{display:none;}</style>'; // for page builder

			if ( strtoupper( $order->payment_gateway ) == strtoupper( 'cod' ) && get_current_user_id() == wpj_get_seller_id( $order ) ) {}
			else echo '<style>.order-cod-row-wrapper{display:none;}</style>'; // for page builder ?>

		</div>

	<?php }

} else {
	wpj_display_transaction_not_allowed_notice();
	
	exit;

}