WPIntell

Source evidence

On country change paypal buttons not showing

Country Based Payments for WooCommerce · support · 2023-01-09T15:01:00+00:00

complaintsentiment
highseverity
1.0relevance
4replies
Evidence linked to opportunitycommercial context

Proof Health

Open evidence

Commercial opportunities need traceable source links before they are treated as build-worthy.

6 / 28 rows with source links

21.4% of this page's analysis has direct source links.

0 build-decision rows missing links

0 rows here require auditable proof before promotion.

22 rows with no attached evidence

0 rows have source counts but still need direct links.

Conversation

support
huzaifa52 unresolved
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 3 years, 5 months ago by huzaifa52 . The page I need help with: [ log in to see the link] Hi, I can see that the Paypal is showing on your site. Do you still have the issue? 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. Hi Ivan, The issue still persists, can you pls look into the it and advice? Thanks. 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.

Comments

4 shown
Ivan Paulin 2023-01-14T20:52:00+00:00

Hi, I can see that the Paypal is showing on your site. Do you still have the issue?

huzaifa52 2023-01-16T05:57:00+00:00

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.

huzaifa52 2023-03-15T11:49:00+00:00

Hi Ivan, The issue still persists, can you pls look into the it and advice? Thanks.

Ivan Paulin 2023-04-05T21:36:00+00:00

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.