Skip to content

Commit

Permalink
remove old function, ref #312
Browse files Browse the repository at this point in the history
  • Loading branch information
kcppdevelopers committed Mar 8, 2016
1 parent 8a7fdf5 commit 9a44226
Showing 1 changed file with 0 additions and 70 deletions.
70 changes: 0 additions & 70 deletions classes/wc-gateway-paypal-express-angelleye.php
Original file line number Diff line number Diff line change
Expand Up @@ -2018,76 +2018,6 @@ static function woocommerce_before_cart() {
* Triggered from the 'woocommerce_proceed_to_checkout' action.
* Displays the PayPal Express button.
*/
static function woocommerce_paypal_express_checkout_button_angelleye_old() {
global $pp_settings, $pp_pro, $pp_payflow;
$payment_gateways = WC()->payment_gateways->get_available_payment_gateways();
// Pay with Credit Card
unset($payment_gateways['paypal_pro']);
unset($payment_gateways['paypal_pro_payflow']);

echo '<div class="clear"></div>';

/**
* Show the paypal express checkout button in cart page when express checkout is enabled and cart total > 0
* If show_on_cart is empty so it's value default to yes
*/
if (@$pp_settings['enabled'] == 'yes' && (empty($pp_settings['show_on_cart']) || $pp_settings['show_on_cart'] == 'yes') && 0 < WC()->cart->total) {
echo '<div class="paypal_box_button" style="position: relative;">';
if (empty($pp_settings['checkout_with_pp_button_type']))
$pp_settings['checkout_with_pp_button_type'] = 'paypalimage';
$angelleyeOverlay = '<div class="blockUI blockOverlay angelleyeOverlay" style="display:none;z-index: 1000; border: none; margin: 0px; padding: 0px; width: 100%; height: 100%; top: 0px; left: 0px; opacity: 0.6; cursor: default; position: absolute; background: url('. WC()->plugin_url() .'/assets/images/select2-spinner.gif) 50% 50% / 16px 16px no-repeat rgb(255, 255, 255);"></div>';
switch ($pp_settings['checkout_with_pp_button_type']) {
case "textbutton":
if (!empty($pp_settings['pp_button_type_text_button'])) {
$button_text = $pp_settings['pp_button_type_text_button'];
} else {
$button_text = __('Proceed to Checkout', 'woocommerce');
}
echo '<div class="paypal_ec_textbutton">';
echo '<a class="paypal_checkout_button button alt" href="' . esc_url(add_query_arg('pp_action', 'expresscheckout', add_query_arg('wc-api', 'WC_Gateway_PayPal_Express_AngellEYE', home_url('/')))) . '">' . $button_text . '</a>';
echo $angelleyeOverlay;
echo '</div>';
break;
case "paypalimage":
echo '<div id="paypal_ec_button">';
echo '<a class="paypal_checkout_button" href="' . esc_url(add_query_arg('pp_action', 'expresscheckout', add_query_arg('wc-api', 'WC_Gateway_PayPal_Express_AngellEYE', home_url('/')))) . '">';
echo "<img src='https://www.paypal.com/" . WC_Gateway_PayPal_Express_AngellEYE::get_button_locale_code() . "/i/btn/btn_xpressCheckout.gif' border='0' alt='" . __('Pay with PayPal', 'paypal-for-woocommerce') . "'/>";
echo "</a>";
echo $angelleyeOverlay;
echo '</div>';
break;
case "customimage":
$button_img = $pp_settings['pp_button_type_my_custom'];
echo '<div id="paypal_ec_button">';
echo '<a class="paypal_checkout_button" href="' . esc_url(add_query_arg('pp_action', 'expresscheckout', add_query_arg('wc-api', 'WC_Gateway_PayPal_Express_AngellEYE', home_url('/')))) . '">';
echo "<img src='{$button_img}' width='150' border='0' alt='" . __('Pay with PayPal', 'paypal-for-woocommerce') . "'/>";
echo "</a>";
echo $angelleyeOverlay;
echo '</div>';
break;
}

/**
* Displays the PayPal Credit checkout button if enabled in EC settings.
*/
if (isset($pp_settings['show_paypal_credit']) && $pp_settings['show_paypal_credit'] == 'yes') {
// PayPal Credit button
$paypal_credit_button_markup = '<div id="paypal_ec_paypal_credit_button">';
$paypal_credit_button_markup .= '<a class="paypal_checkout_button" href="' . esc_url(add_query_arg('use_paypal_credit', 'true', add_query_arg('pp_action', 'expresscheckout', add_query_arg('wc-api', 'WC_Gateway_PayPal_Express_AngellEYE', home_url('/'))))) . '" >';
$paypal_credit_button_markup .= "<img src='https://www.paypalobjects.com/webstatic/en_US/i/buttons/ppcredit-logo-small.png' alt='Check out with PayPal Credit'/>";
$paypal_credit_button_markup .= '</a>';
$paypal_credit_button_markup .= $angelleyeOverlay;
$paypal_credit_button_markup .= '</div>';

echo $paypal_credit_button_markup;
}
?>
<!--<div class="blockUI blockOverlay angelleyeOverlay" style="display:none;z-index: 1000; border: none; margin: 0px; padding: 0px; width: 100%; height: 100%; top: 0px; left: 0px; opacity: 0.6; cursor: default; position: absolute; background: url(<?php /*echo WC()->plugin_url(); */?>/assets/images/select2-spinner.gif) 50% 50% / 16px 16px no-repeat rgb(255, 255, 255);"></div>-->
<?php
echo "<div class='clear'></div></div>";
}
}

static function woocommerce_paypal_express_checkout_button_angelleye() {
global $pp_settings;
if (@$pp_settings['enabled'] == 'yes' && (empty($pp_settings['show_on_cart']) || $pp_settings['show_on_cart'] == 'yes') && 0 < WC()->cart->total) {
Expand Down

0 comments on commit 9a44226

Please sign in to comment.