• For my website i have set “India” with payment gateway as “Razorpay”
    and rest other countries set with paypal.

    But for other countries, paypal button does not appear. But If I reload it, the paypal button appears.

    https://prnt.sc/yt9Krnjpohk0

    • This topic was modified 2 years, 1 month ago by huzaifa52.

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

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Ivan Paulin

    (@ivan_paulin)

    Hi,

    I can see that the Paypal is showing on your site.

    Do you still have the issue?

    Thread Starter huzaifa52

    (@huzaifa52)

    Hi Ivan, thank you for your response.

    Yes the issue is still there.
    Since it is a live site i could not keep “paypal (new plugin)” i resumed with “Paypal standard (old plugin)”

    I have setup a copy for you on demoserver below with “paypal (new plugin)”
    https://mydemoserver.in/cpe/mihirs-handbook-and-advanced-course/

    Steps to copy the error:
    1.change currency to USD
    2.add any product to cart
    3.view cart
    4.proceed to checkout
    5.on checkout page select country other than india and paypal does not appear. But if the page is reloaded manually paypal button appears.

    screenshot is attached
    https://prnt.sc/BSYAsQAlEMNh
    https://prnt.sc/ugezRDRNxBs6
    https://prnt.sc/R8Dd0eEIphSt

    Do you need any further information, do let me know.

    Thread Starter huzaifa52

    (@huzaifa52)

    Hi Ivan,

    The issue still persists, can you pls look into the it and advice?

    Thanks.

    Plugin Author Ivan Paulin

    (@ivan_paulin)

    Hi,

    Yes, there seems to be a problem with WooCommerce Paypal Payments plugin. I’m still working on finding a solution.
    If you must use WooCommerce Paypal Payments, maybe for now, you can reload the checkout page when someone changes country. Something like bellow

    // NOT official solution/fix. Implement on your own
    add_action('wp_footer', function() {
      if ( is_checkout() ) {
      ?>
      <script>
        // add to checkout page 
        jQuery(document).ready(function($) {
          $('select#billing_country').change(function(){
            // Replace /checkout with your checkout page URL
            window.location.href = '/checkout';
          });
        });
    
      </script>
      <?php
      }
    });

    It is not a very nice solution because it will reload the checkout page, and customers might find it annoying, but it helps.
    Please make sure to test on staging and backup the live site.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘On country change paypal buttons not showing’ is closed to new replies.