Notices while checkout
-
Good day!
Many of our custom gateway plugins have redefined checkout form. In partiсular, the last name fields was excluded from them.
But, we found a problem here. One of EDD functions processing the cart is edd_purchase_form_validate_logged_in_user() located in /includes/process-purchase.php. In line 302 of this script the function seeks for $_POST[‘edd_last’] value, and it doesn’t find it there, because this field was excluded. It creates a PHP notice “undefined index” that fails the checkout process when notices are turned on in PHP.
I’d gladly redefine the piece of code there, like
empty($_POST['edd_last']) ? '' : $_POST['edd_last']
but this function doesn’t allow it.
Can you add something like this code there? Otherwise i will be forced to add a hidden last name fields to all custom gateways. That’d be sort of wierd 🙂
Thanks in advance.
- The topic ‘Notices while checkout’ is closed to new replies.