Пример #1
0
    if (empty($pmpro_level_ready) && empty($edit)) {
        $msgt .= " <a href=\"?page=pmpro-membershiplevels&edit=-1\">" . __("Add a membership level to get started.", "pmpro") . "</a>";
    } elseif ($pmpro_level_ready && !$pmpro_pages_ready && $view != "pmpro-pagesettings") {
        $msgt .= " <a href=\"?page=pmpro-pagesettings\">" . __("Set up the membership pages", "pmpro") . "</a>.";
    } elseif ($pmpro_level_ready && $pmpro_pages_ready && !$pmpro_gateway_ready && $view != "pmpro-paymentsettings") {
        $msgt .= " <a href=\"?page=pmpro-paymentsettings\">" . __("Set up your SSL certificate and payment gateway", "pmpro") . "</a>.";
    }
    if (empty($msgt)) {
        $msg = false;
    }
}
if (!pmpro_checkLevelForStripeCompatibility()) {
    $msg = -1;
    $msgt = __("The billing details for some of your membership levels is not supported by Stripe.", "pmpro");
    if ($view == "pmpro-membershiplevels" && !empty($_REQUEST['edit']) && $_REQUEST['edit'] > 0) {
        if (!pmpro_checkLevelForStripeCompatibility($_REQUEST['edit'])) {
            global $pmpro_stripe_error;
            $pmpro_stripe_error = true;
            $msg = -1;
            $msgt = __("The billing details for this level are not supported by Stripe. Please review the notes in the Billing Details section below.", "pmpro");
        }
    } elseif ($view == "pmpro-membershiplevels") {
        $msgt .= " " . __("The levels with issues are highlighted below.", "pmpro");
    } else {
        $msgt .= " <a href=\"?page=pmpro-membershiplevels\">" . __("Please edit your levels", "pmpro") . "</a>.";
    }
}
if (!pmpro_checkLevelForPayflowCompatibility()) {
    $msg = -1;
    $msgt = __("The billing details for some of your membership levels is not supported by Payflow.", "pmpro");
    if ($view == "pmpro-membershiplevels" && !empty($_REQUEST['edit']) && $_REQUEST['edit'] > 0) {
Пример #2
0
    $sqlQuery = "SELECT * FROM {$wpdb->pmpro_membership_levels} ";
    if ($s) {
        $sqlQuery .= "WHERE name LIKE '%{$s}%' ";
    }
    $sqlQuery .= "ORDER BY id ASC";
    $levels = $wpdb->get_results($sqlQuery, OBJECT);
    foreach ($levels as $level) {
        ?>
		<tr class="<?php 
        if (!$level->allow_signups) {
            ?>
pmpro_gray<?php 
        }
        ?>
 <?php 
        if (!pmpro_checkLevelForStripeCompatibility($level) || !pmpro_checkLevelForBraintreeCompatibility($level) || !pmpro_checkLevelForPayflowCompatibility($level) || !pmpro_checkLevelForTwoCheckoutCompatibility($level)) {
            ?>
pmpro_error<?php 
        }
        ?>
">			
			<td><?php 
        echo $level->id;
        ?>
</td>
			<td><?php 
        echo $level->name;
        ?>
</td>
			<td>
				<?php 
Пример #3
0
			<th></th>
		</tr>
	</thead>
	<tbody>
		<?php
			$sqlQuery = "SELECT * FROM $wpdb->pmpro_membership_levels ";
			if($s)
				$sqlQuery .= "WHERE name LIKE '%$s%' ";
			$sqlQuery .= "ORDER BY id ASC";
			
			$levels = $wpdb->get_results($sqlQuery, OBJECT);
						
			foreach($levels as $level)
			{			
		?>
		<tr class="<?php if(!$level->allow_signups) { ?>pmpro_gray<?php } ?> <?php if(!pmpro_checkLevelForStripeCompatibility($level) || !pmpro_checkLevelForBraintreeCompatibility($level) || !pmpro_checkLevelForPayflowCompatibility($level)) { ?>pmpro_error<?php } ?>">			
			<td><?php echo $level->id?></td>
			<td><?php echo $level->name?></td>
			<td>
				<?php if(pmpro_isLevelFree($level)) { ?>
					FREE
				<?php } else { ?>
					<?php echo $pmpro_currency_symbol?><?php echo $level->initial_payment?>
				<?php } ?>
			</td>
			<td>
				<?php if(!pmpro_isLevelRecurring($level)) { ?>
					--
				<?php } else { ?>						
					<?php echo $pmpro_currency_symbol?><?php echo $level->billing_amount?> every <?php echo $level->cycle_number.' '.sornot($level->cycle_period,$level->cycle_number)?>