Easy Digital Downloads
[resolved] Notices while checkout (3 posts)

  1. Ahaenor
    Posted 2 years ago #

    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.


  2. Pippin Williamson
    Pippin's Plugins and Plugin Reviewer
    Plugin Author

    Posted 2 years ago #

  3. Ahaenor
    Posted 2 years ago #

    Cool! Thnx again :)

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Easy Digital Downloads
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic


No tags yet.