Troubleshooting
Learn how to troubleshoot the WordPress Plugin.

How to avoid PayPal overriding the GlobalCommerce address

To restrict the user from overriding the shipping address via PayPal, in the createSource request, send a value of false as the requestShipping element.
1
let payPalPayload = {
2
3
'type': 'payPal',
4
5
'amount': cart.pricing.orderTotal.value,
6
7
'currency': 'USD',
8
9
'payPal': {
10
11
'returnUrl': window.location.href + '?ppsuccess=true',
12
13
'cancelUrl': window.location.href + '?ppcancel=true',
14
15
'items': payPalItems,
16
17
'taxAmount': cart.pricing.tax.value,
18
19
'requestShipping': requestShipping false
Copied!

Shoppers are landing on the login page when the expected behavior is that all shoppers check out as a guest

By default, if the shopper is not logged in or hasn't clicked Continue as Guest, they are redirected to the login page. If the expectation is for all shoppers to checkout as a guest add the following snippet to the theme of the site:
1
<script>
2
document.cookie = 'drgc_guest_flag=true; path=/';
3
</script>
Copied!
Note: There is no specific place to insert the script; both <head> and <body> will work. Ensure the script exists on all the pages.
Last modified 8mo ago