modules/acm/src/Access/VersionAccessCheck.php
public function access() {
    $version = $this->configFactory->get('acm.connector')->get('api_version');
    if (($version === 'v2') && ($this->account->hasPermission('access commerce administration pages'))) {
      return AccessResult::allowed();
    }
    return AccessResult::forbidden();
  }
public function access() {
    $version = $this->configFactory->get('acm.connector')->get('api_version');
    if (($version === 'v2') && ($this->account->hasPermission('access commerce administration pages'))) {
      return AccessResult::allowed();
    }
    return AccessResult::forbidden();
  }
public function access ( ) { $ version = $ this -> configFactory -> get ( 'acm.connector' ) -> get ( 'api_version' ) ; if ( ( $ version === 'v2' ) && ( $ this -> account -> hasPermission ( 'access commerce administration pages' ) ) ) { return AccessResult :: allowed ( ) ; } return AccessResult :: forbidden ( ) ; }
Check if v2 is set up and user can access commerce admin pages.

@return \Drupal\Core\Access\AccessResultInterface
The access result.
Check if v2 is set up and user can access commerce admin pages .