diff --git a/commerce_checkout_progress.module b/commerce_checkout_progress.module index a906954..f2b8df6 100644 --- a/commerce_checkout_progress.module +++ b/commerce_checkout_progress.module @@ -196,7 +196,7 @@ function theme_commerce_checkout_progress_list($variables) { // If a user is on step 1, clicking a link next steps will be redirect them back. // Only render the link on the pages those user has already been on. // Make sure the loaded order is the same one found in the URL. - if (arg(1) == $order_id) { + if (arg(1) == $order_id && commerce_checkout_page_access($page, $order)) { $href = isset($page['href']) ? $page['href'] : "checkout/{$order_id}/{$page_id}"; $data = l(filter_xss($data), $href, array('html' => TRUE)); } @@ -318,7 +318,7 @@ function commerce_checkout_progress_get_items() { $pages[$pane['page']]['has_item'] = isset($pages[$pane['page']]['has_item']) ? $pages[$pane['page']]['has_item'] : TRUE; } } - + // Allow other modules to alter the enabled checkout pages. drupal_alter('commerce_checkout_progress_get_items', $pages);