We have somewhat of an unconventional use case, we sell "virtual gifts" that aren't shipped. We do, however, have the 'commerce_shipping' module installed because we have a feature of the checkout workflow that allows the donor to choose a greeting card to be mailed.
The issue is that the block of code in commerce_paypal_ec.module that starts on line 1048 with the comment "// If the shipping module is enabled..." assumes that if the module exists then the $order_wrapper->commerce_customer_shipping->commerce_customer_address object property also exist. This is causing a fatal error when the user clicks on the button to pay on PayPal. We hacked the code to first check if the $order_wrapper->commerce_customer_shipping property is set.
This...
if (!empty($order_wrapper->commerce_customer_shipping->commerce_customer_address)) {
... became this ...
if (isset($order_wrapper->commerce_customer_shipping) && !empty($order_wrapper->commerce_customer_shipping->commerce_customer_address)) {
Comment | File | Size | Author |
---|---|---|---|
#1 | cart_without_shipping-2480849-1.patch | 1.03 KB | capellic |
Comments
Comment #1
capellicPatch file attached.
Comment #2
rszrama CreditAttribution: rszrama commentedThanks!