Skip to content

Commit

Permalink
Express Checkout - Review Screen Button Aligntment, ref #748
Browse files Browse the repository at this point in the history
  • Loading branch information
kcppdevelopers committed May 22, 2017
1 parent 94dc898 commit 8a33c0b
Showing 1 changed file with 5 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -246,13 +246,6 @@ public function ec_display_checkout_fields($checkout_fields) {
$checkout_fields['billing']['billing_' . $field]['class'][] = 'hidden';
}
}
// if (isset($checkout_fields['shipping']) && isset($checkout_fields['shipping']['billing_' . $field])) {
// $required = isset($checkout_fields['billing']['billing_' . $field]['required']) && $checkout_fields['billing']['billing_' . $field]['required'];
// if (!$required || $required && $value) {
// $checkout_fields['billing']['billing_' . $field]['class'][] = 'express-provided';
// $checkout_fields['billing']['billing_' . $field]['class'][] = 'hidden';
// }
// }
}
}
return $checkout_fields;
Expand Down Expand Up @@ -408,7 +401,6 @@ public function top_cart_button() {

public function mini_cart_button() {
if (AngellEYE_Utility::is_express_checkout_credentials_is_set()) {
$this->woocommerce_before_cart();
$mini_cart_button_html = '';
$mini_cart_button_html .= $this->woocommerce_paypal_express_checkout_button_angelleye($return = true);
$mini_cart_button_html .= "<div class='clear'></div>";
Expand Down Expand Up @@ -573,16 +565,16 @@ public function woocommerce_before_cart() {
$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">
jQuery(document).ready(function(){
if (jQuery(".checkout-button, .button.checkout.wc-forward").is("input")) {
jQuery(".checkout-button, .button.checkout.wc-forward").val("' . $checkout_button_display_text . '");
if (jQuery(".checkout-button").is("input")) {
jQuery(".checkout-button").val("' . $checkout_button_display_text . '");
} else {
jQuery(".checkout-button, .button.checkout.wc-forward").html("<span>' . $checkout_button_display_text . '</span>");
jQuery(".checkout-button").html("<span>' . $checkout_button_display_text . '</span>");
}
});
</script>';
} elseif ($this->show_on_cart == 'yes') {
echo '<style> input.checkout-button,
a.checkout-button, .button.checkout.wc-forward {
a.checkout-button {
display: none !important;
}</style>';
}
Expand All @@ -594,7 +586,7 @@ public function angelleye_woocommerce_order_button_html($order_button_hrml) {
if($this->function_helper->ec_is_express_checkout()) {
$order_button_text = __('Cancel order', 'paypal-for-woocommerce');
$cancel_order_url = add_query_arg('pp_action', 'cancel_order', WC()->api_request_url('WC_Gateway_PayPal_Express_AngellEYE'));
$order_button_hrml .= apply_filters( 'angelleye_review_order_cance_button_html', '<a class="button alt angelleye_cancel" name="woocommerce_checkout_place_order" href="' . esc_attr( $cancel_order_url ) . '" >' .$order_button_text. '</a>' );
$order_button_hrml = apply_filters( 'angelleye_review_order_cance_button_html', '<a class="button alt angelleye_cancel" name="woocommerce_checkout_place_order" href="' . esc_attr( $cancel_order_url ) . '" >' .$order_button_text. '</a>'. $order_button_hrml );
}
return $order_button_hrml;
}
Expand Down

0 comments on commit 8a33c0b

Please sign in to comment.