-
Notifications
You must be signed in to change notification settings - Fork 191
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
give_require_billing_address
filter is always set to false
#249
Comments
Allow to modify the `give_require_billing_address` filtered value.
Hmm, I'm going to dig into this one. Seems alarming off the bat. |
@pryley how about we simply remove |
I'm trying to wrap my head around this... I have removed Perhaps we can write a function similar to |
- Require billing address validation if $_POST contains the 'billing_country' field. - Verify that the offline form customization option is enabled when checking whether or not to show the billing fields.
@pryley we're getting close here. The only issue now that I can see is with |
Currently gateways determine whether or not they include the CC fields by including a gateway specific hook ( Since the form ID is passed to these hooks, you could pass it through to the And of course gateways can override through the |
I've almost got nearly what you described working. Give me a sec to commit |
@pryley if you have a moment can you check out what I did here: 15cf87d It seems to be functioning nicely upon initial testing. Here's the branch: https://github.com/WordImpress/Give/tree/issue/249 |
@DevinWalker Oh I didn't see this, I also just made a commit. :) |
The
give_require_billing_address
filter (/includes/process-purchase.php:275
) istrue
by default, but will always be set tofalse
because ofgive_manual_no_cc_validation()
.Here is a alternate way to write the function that allows other functions to modify the filtered value:
Since the default filtered value is
true
, you will need to add a similar function to any gateways that do not require billing address validation (i.e. PayPal Standard, Offline, etc.).There is also an issue with the Braintree gateway plugin where form validation is not performed via ajax, making it impossible to use the single Form Payment Field
Reveal Upon Click / Modal Window Upon Click
options successfully.I mention this here because I am sending you an email with a preliminary fix for the Braintree plugin, but it is not complete without being able to also validate the billing address fields.
The text was updated successfully, but these errors were encountered: