• Resolved Corey Allen

    (@coreya)


    Hello
    In a past support ticket I asked how to make it so the first and last name were no longer required. I used the function below and it worked great but now appears to be broken.

    function my_custom_prefix_give_modify_required_fields( $required_fields ) {

    if ( isset( $required_fields[‘give_first’] ) ) {
    unset( $required_fields[‘give_first’] );
    }

    return $required_fields;

    }

    add_filter( ‘give_purchase_form_required_fields’, ‘my_custom_prefix_give_modify_required_fields’, 10, 1 );
    add_filter( ‘give_donation_form_required_fields’, ‘my_custom_prefix_give_modify_required_fields’, 10, 1 );

    https://ww.wp.xz.cn/plugins/give/

Viewing 5 replies - 1 through 5 (of 5 total)
  • Thread Starter Corey Allen

    (@coreya)

    I found the cause
    I had created a site plugin to add custom functions it worked fine in prior versions but removing that function from the custom plugin and adding it to my theme functions fixed the issue.

    Plugin Contributor Matt Cromwell

    (@webdevmattcrom)

    Glad you were able to get it resolved. Did you update the code in the custom functions, or you no longer need that functionality?

    Thread Starter Corey Allen

    (@coreya)

    Actually it’s no longer working, I was logged in at the time and therfore didn’t see the issue. logging out prevents it from working. So I guess I will need the updated code.

    Plugin Contributor Matt Cromwell

    (@webdevmattcrom)

    I just tested that code locally and it works exactly as expected. There must be a conflict with something else or the code you are using is different from the code above.

    Try disabling other plugins and paste the code above back in for a fresh start.

    Thread Starter Corey Allen

    (@coreya)

    Must be a conflict of some kind, I disabled it and re-enabled a direct link to paypal we used previously, I’ll dig into the cause once I carve out some time. Thanks again for the help.

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘Custom functions broken after update’ is closed to new replies.