I found a good side effect of the code for stopping the workbook from activating when order has not been completed.
If you include these line of code into both functions getactivation and dovalidation, you will no longer have to use the xlspadlock_blocked.
All you have to do to block someone from both activating and validating is sitting relax with you mobile phone with the WooComm app installed and change the order status to whatever different to ‘completed’, then the workbook cannot start. The snippet of code is at below for your cut and paste convenience.
// Check if order completed before passing this check point
$order_status = $order_data[‘status’];
if ( $order_status != ‘completed’ )
$msg = 'The order is '. $order_status . ‘. Cannot proceed.’;
throw new Exception($msg);