<?php 
    if ($order !== false) {
        ?>
  <h2><?php 
        _e('Order Number', 'cart66');
        ?>
: <?php 
        echo $order->trans_id;
        ?>
</h2>

  <?php 
        if (CART66_PRO && $order->hasAccount() == 1) {
            $logInLink = Cart66AccessManager::getLogInLink();
            $memberHomePageLink = Cart66AccessManager::getMemberHomePageLink();
            if ($logInLink !== false) {
                echo '<h2>Your Account Is Ready</h2>';
                if (Cart66Common::isLoggedIn() && $memberHomePageLink !== false) {
                    echo "<p><a href=\"{$memberHomePageLink}\">" . __("Members Home", "cart66") . "</a>.</p>";
                } else {
                    echo "<p><a href=\"{$logInLink}\">" . __("Log into your account", "cart66") . "</a>.</p>";
                }
            }
        }
        ?>

  <?php 
        if ($order->hasAccount() == -1) {
            ?>
    <?php 
Example #2
0
 /**
  * Hide private pages and pages that require a subscription feature level the subscriber does not have
  */
 public function hidePrivatePages($excludes)
 {
     global $wpdb;
     $hidePrivate = true;
     $mySubItemNums = array();
     $activeAccount = false;
     $featureLevel = false;
     if (Cart66Common::isLoggedIn()) {
         $hidePrivate = false;
         $account = new Cart66Account(Cart66Session::get('Cart66AccountId'));
         if ($account->isActive()) {
             $activeAccount = true;
             $featureLevel = $account->getFeatureLevel();
         }
         // Optionally add the logout link to the end of the navigation
         if (Cart66Setting::getValue('auto_logout_link')) {
             add_filter('wp_list_pages', array($this, 'appendLogoutLink'));
         }
         // Hide guest only pages
         $guestOnlyPageIds = Cart66AccessManager::getGuestOnlyPageIds();
         $excludes = array_merge($excludes, $guestOnlyPageIds);
     }
     // Hide pages requiring a feature level that the subscriber does not have
     $hiddenPages = Cart66AccessManager::hideSubscriptionPages($featureLevel, $activeAccount);
     if (count($hiddenPages)) {
         $excludes = array_merge($excludes, $hiddenPages);
     }
     if ($hidePrivate) {
         // Build list of private page ids
         $privatePageIds = Cart66AccessManager::getPrivatePageIds();
         $excludes = array_merge($excludes, $privatePageIds);
     }
     // Merge private page ids with other excluded pages
     if (is_array(get_option('exclude_pages'))) {
         $excludes = array_merge(get_option('exclude_pages'), $excludes);
     }
     sort($excludes);
     return $excludes;
 }