• Resolved lordmuz

    (@lordmuz)


    When I add items to the cart, and then click on the mini cart and select “view cart” I see the default shipping method selected, and the “checkout” and “paypal” buttons appear as they should. If I change the shipping method, the paypal buttons disappear! If I press F5 to refresh the browser, then they reappear?? This never happened with the previous plugin “WooCommerce PayPal Checkout Gateway”

    I am losing customers because people change their shipping selection and then cant use paypal express checkout – they have no idea they can refresh their browser and get the paypal buttons to reappear. This needs to be fixed!

    The page I need help with: [log in to see the link]

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Support Syde Joost

    (@joostvandevijver)

    Hello @lordmuz

    thank you for reaching out to us.
    I have tested and recreated the issue, so can confirm this is a bug that we had not identified before. I have opened a new bug ticket for our developers to take a look at it and see if there is a quick fix available and correct it in a future release.

    I have linked this thread to our ticket, so we will let you know once we have any sort of fix for this issue. The only option I can advise is to deactivate the payment button on the basket page, but this might not be the solution you want. Currently, there is no other solution I can offer.

    Hopefully, I can give you better news on the next update.

    Kind regards,
    Joost

    Plugin Support Syde Joost

    (@joostvandevijver)

    Hello @lordmuz

    it seems I missed that our team is already aware of this bug and has already a ticket open for it. I have linked your thread to it so you will be update on that one.

    We have a temporary workaround available for you as well:

    Applying the button to a different hook may cause it to not disappear upon changing shipping methods: hook the cart page buttons after the cart to prevent it from disappearing upon changing shipping options (might require additional CSS for placement).
    The button seemingly only disappears when hooked into woocommerce_proceed_to_checkout or woocommerce_after_cart_totals or some others, but woocommerce_after_cart causes the button to not disappear.

    Here is a filter that you could use:
    https://gist.github.com/Sirvijver/7fd5cfccaaa99b1ce90fa6f479e77eaf

    Let me know if that helps you further.

    Kind regards,
    Joost

    Plugin Support Syde Joost

    (@joostvandevijver)

    We have not heard back from you in a while, so I’m marking this thread as resolved.
    If you have any further questions, please feel free to reopen this topic or create a new one.

    This bug is still unresolved.

    Plugin Support Syde Joost

    (@joostvandevijver)

    Hello,

    This issue should be resolved with yesterday’s release: version 1.8.1
    Please update the plugin and let us know if you still encounter this issue (best to open a new thread if it does).

    Kind regards,
    Joost

    Most of the time, the problem affects sites that block payments depending on the Delivery option. For example, the cash on delivery option does not require PayPal.

    And then, when entering the checkout page, we have previously selected a cash on delivery option – our PayPal payments will not appear even if we change to courier delivery with prepayment. Because the block in which the button is to be rendered will be missing.

    To the plugin author
    The problem in your plugin is in that place:

    if ( ! isset( $available_gateways['ppcp-gateway'] ) ) {
    			return;
    		}
    
    		// The wrapper is needed for the loading spinner,
    		// otherwise jQuery block() prevents buttons rendering.
    		echo '<div class="ppc-button-wrapper"><div id="ppc-button"></div></div>';

    This condition should not exist.

    However, it would be more correct to insert it with JS. There is no problem at all to render this with JS after the #payment element

    To plug-in users
    Anyone looking to fix it can use the code below:

    add_action('woocommerce_review_order_after_payment', 'add_wrapper_for_paypal');
    
    function add_wrapper_for_paypal()
    {
    	$available_gateways = WC()->payment_gateways->get_available_payment_gateways();
    	
    	if (!isset($available_gateways['ppcp-gateway'])) {
    		echo '<div class="ppc-button-wrapper"><div id="ppc-button"></div></div>';
    	}
    }
    
    • This reply was modified 2 years, 4 months ago by Damian Orzol.
    • This reply was modified 2 years, 4 months ago by Damian Orzol.
Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Changing the shipping method on the cart makes the paypal cart buttons disappear’ is closed to new replies.