Handle access to order delivery process page

This commit is contained in:
Almira Krdzic
2018-12-03 01:59:24 +01:00
parent 5d5ab87595
commit 2c0e217a49
2 changed files with 19 additions and 0 deletions

View File

@@ -23,6 +23,15 @@ class Wiaas_Admin_Order_Process_Flow {
public static function output_delivery_process() {
$order_id = absint( $_GET['id'] );
$has_access = Wiaas_Access_Management::can_current_user_read_order($order_id);
if (! $has_access) {
echo "<h2>You don't have permission to view this order.</h2>";
return;
}
$order = wc_get_order($order_id);
if ( !$order ) {