Closed terencenus closed 5 years ago
This is supported in 1.6 by Smart Payment Buttons (if enabled), which adds a JS integration to the mini-cart as well:
(Can close in favor of https://github.com/woocommerce/woocommerce-gateway-paypal-express-checkout/issues/436, or keep open while Smart Payment Buttons are optional, to track this for merchants who haven't enabled them.)
Recalling the Issue #53, on desktop when clicking the button on the mini-cart widget, the Paypal In-Context Checkout modal window doesn’t pop up, instead the checkout continues in the same browser window. Instead the modal iFrame should open and a black layer should overlay the website on background, exactly like if the button is pressed on the cart page.
Tested with StoreFront, other themes, WooCommerce 3.2.x and the Official plugin WooCommerce PayPal Express Checkout Gateway 1.4.4.
I don't know, I suppose there is some condition not passed correctly when calling https://www.paypalobjects.com/api/checkout.js.
May it be that in 'class-wc-gateway-ppec-cart-handler.php', the priority must be higher?
add_action( 'woocommerce_widget_shopping_cart_buttons', array( $this, 'display_mini_paypal_button' ), 20 );
Or that something can be corrected here:
Or in wc-gateway-ppec-frontend-in-context-checkout.js