Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author Matt Cromwell

    (@webdevmattcrom)

    You should be able to add additional personal information into that metabox with this action: give_payment_personal_details_list

    Thanks!

    Plugin Author Matt Cromwell

    (@webdevmattcrom)

    A really useful tool for finding things like that is our own version of “Show Only Hooks” which we call “Give Hook Helper”. You can install it from here:
    https://github.com/WordImpress/Give-Hook-Helper

    Thread Starter fid

    (@fid)

    Thanks. Could you give an example snippet of how this hook can be used to display a payment meta field?

    Thread Starter fid

    (@fid)

    This is what I added in my functions.php, it did not work.

    /**
     * Show Phone No. in Payment Details
     *
     * @param $payment_meta
     * @param $user_info
     */
    function give_show_phone_no( $payment_meta, $user_info ) {
        $give_phone = give_get_meta( $payment_id, '_give_phone', true );
            if ( $give_phone ) : ?>
            <b><?php _e( 'Phone No:', 'give' ); ?></b>
            <?php echo $give_phone; ?>
        </div>
            <?php endif;
     }
    
    add_action( 'give_payment_personal_details_list', 'give_show_phone_no', 10, 2 );
    Thread Starter fid

    (@fid)

    ^ That worked. Thanks!

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘hook to display value in donation meta’ is closed to new replies.