Skip to content

Mapping fields from Ninja Form to GiveWP Form #7224

Discussion options

You must be logged in to vote

To add an email recipient there is a meta_key "_give_new-donation_recipient" which is not working.

The _give_new-donation_recipient meta expects a keyed array:

'_give_new-donation_recipient' => [
    'email' => get_bloginfo('admin_email'),
],

This array is serialized for storage in the database:

"a:1:{s:5:"email";s:20:"admin@wordpress.test";}"

To set a custom recipient, you'll need to set the serialized string as the value of the meta:

"a:1:{s:5:"email";s:23:"john.doe@nonprofit.test";}"

Note that in the above example s:23 specifies that the email address is 23 characters, which is how PHP parses the serialized string, so you can't just copy/paste and change the email. You will need to s…

Replies: 3 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Answer selected by kjohnson
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@captainbitts
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
3 participants