• Under direction from PayPal guy, I installed PayPal for WooCommerce plugin so that our site could start using PayPal express. All seemed to work well. But when a customer checks out using PayPal (instead of a credit card, which works just fine here), the last steps go like this:

    http://www.cmtausa.org/store/checkout/review-order/?pp_action=revieworder&token=EC-xxx&PayerID=yyy

    customer clicks “Place Order” and the URL changes to:

    http://www.cmtausa.org/store/checkout/review-order/?pp_action=payaction&token=EC-xxx&PayerID=yyy

    but the page turns white with these error message:

    Warning: Missing argument 2 for WC_Smart_Coupons::save_called_credit_details_in_order() in /home/admin/public_html/wp-content/plugins/woocommerce-smart-coupons/woocommerce-smart-coupons.php on line 1591

    Warning: Cannot modify header information – headers already sent by (output started at /home/admin/public_html/wp-content/plugins/woocommerce-smart-coupons/woocommerce-smart-coupons.php:1591) in /home/admin/public_html/wp-includes/pluggable.php on line 1207

    Indicating an error upstream somewhere, where an extraneous whitespace (probably) has been mistakenly sent to the browser. This happens whether using a coupon code or not, and again ONLY happens during a PayPal processed checkout, and ONLY started happening since setting up PayPal for WooCommerce and using PayPal Express.

    It’s quite problematic as the payment through PayPal goes through, but the customer gets no indication of that, just the error message!

    Updated PayPal for WooCommerce plugin (to 1.2.3) AND the WooCommerce Smart Coupon plugin (today, v 3.1.1) and it still happens.

    https://wordpress.org/plugins/paypal-for-woocommerce/

Viewing 1 replies (of 1 total)
  • Plugin Contributor angelleye

    (@angelleye)

    The problem is pointing directly to the other plugin files, so that’s where the issue is going to need to be fixed.

    That said, what you can do is disable error display on your site/server so that the error about a missing argument does not show up, and then that would allow the redirect to happen so the checkout could continue without running into the headers already sent error.

    One way to do that is to make sure WP_DEBUG is set to false in your config file. Also check your server’s php.ini file for settings about PHP error reporting.

    In a live environment it’s always best to disable error reporting for this reason, and also because it allows hackers to see information that could help them potentially cause harm to your site.

    So again, that should allow the checkout to move on without killing the whole experience, but there may or may not still be something else going on because of the invalid argument warning.

Viewing 1 replies (of 1 total)
  • The topic ‘PPforWoo breaking Woo Smart Coupons with Headers Already Sent error’ is closed to new replies.