Skip to content

Commit

Permalink
Plugin Settings Panel, ref #214
Browse files Browse the repository at this point in the history
  • Loading branch information
kcppdevelopers committed Dec 24, 2015
1 parent 41b57be commit 8e5eed2
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion template/admin.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,13 @@
<?php if ($active_tab == 'general_settings') { ?>

<?php
$tool_subtab = $_GET['gateway'] ? $_GET['gateway'] : 'express_checkout';
$tool_subtab = isset($_GET['gateway']) ? $_GET['gateway'] : 'express_checkout';
?>
<h2 class="nav-tab-wrapper">
<a href="?page=<?php echo $this->plugin_slug; ?>&tab=general_settings&gateway=express_checkout" class="nav-tab <?php echo $tool_subtab == 'express_checkout' ? 'nav-tab-active' : ''; ?>"><?php echo __('PayPal Express Checkout', $this->plugin_slug); ?></a>
<a href="?page=<?php echo $this->plugin_slug; ?>&tab=general_settings&gateway=payflow" class="nav-tab <?php echo $tool_subtab == 'payflow' ? 'nav-tab-active' : ''; ?>"><?php echo __('PayPal Payments Pro (PayFlow)', $this->plugin_slug); ?></a>
<a href="?page=<?php echo $this->plugin_slug; ?>&tab=general_settings&gateway=dodirectpayment" class="nav-tab <?php echo $tool_subtab == 'dodirectpayment' ? 'nav-tab-active' : ''; ?>"><?php echo __('PayPal Website Payments Pro (DoDirectPayment)', $this->plugin_slug); ?></a>
<a href="?page=<?php echo $this->plugin_slug; ?>&tab=general_settings&gateway=paypal_plus" class="nav-tab <?php echo $tool_subtab == 'paypal_plus' ? 'nav-tab-active' : ''; ?>"><?php echo __('PayPal Plus', $this->plugin_slug); ?></a>
</h2>

<?php
Expand Down Expand Up @@ -57,6 +58,17 @@
<?php
}
?>

<?php
if ((isset($_GET['tab']) && isset($_GET['gateway'])) && ($_GET['tab'] == 'general_settings' && $_GET['gateway'] == 'paypal_plus')) {
?>
<div class="wrap">
<p><?php _e('PayPal PLUS is a solution where PayPal offers PayPal, Credit Card and ELV as individual payment options on the payment selection page. The available payment methods are provided in a PayPal hosted iFrame.', $this->plugin_slug); ?></p>
<a href="<?php echo admin_url('admin.php?page=wc-settings&tab=checkout&section=wc_gateway_paypal_plus_angelleye'); ?>"><?php _e('PayPal Plus Setting', $this->plugin_slug); ?></a>
</div>
<?php
}
?>

<?php } else { ?>
<form method="post" action="options.php" id="woocommerce_offers_options_form">
Expand Down

0 comments on commit 8e5eed2

Please sign in to comment.