Skip to content

Commit

Permalink
Express Checkout - Adjustments Necessary, ref #686
Browse files Browse the repository at this point in the history
  • Loading branch information
kcppdevelopers committed May 8, 2017
1 parent 5b3e25e commit de41a30
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -549,10 +549,11 @@ public function woocommerce_before_cart() {
$payment_gateways = WC()->payment_gateways->get_available_payment_gateways();
unset($payment_gateways['paypal_pro']);
unset($payment_gateways['paypal_pro_payflow']);
if( $this->show_on_checkout != 'regular' && $this->show_on_checkout != 'both' && empty($payment_gateways)) {
$payment_gateways = 1;
$payment_gateway_count = count($payment_gateways);
if( $this->show_on_checkout != 'regular' && $this->show_on_checkout != 'both') {
$payment_gateway_count = $payment_gateway_count + 1;
}
if ($this->enabled == 'yes' && count($payment_gateways) == 1) {
if ($this->enabled == 'yes' && $payment_gateway_count == 1) {
if ($this->paypal_pro_enabled == 'yes' || $this->paypal_flow_enabled == 'yes') {
$checkout_button_display_text = $this->show_on_cart == 'yes' ? __('Pay with Credit Card', 'paypal-for-woocommerce') : __('Proceed to Checkout','paypal-for-woocommerce');
echo '<script type="text/javascript">
Expand Down

0 comments on commit de41a30

Please sign in to comment.