Last active
March 15, 2021 12:04
-
-
Save JarrydLong/33e2d1f2a14a802e2ca9b563af7a83d7 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| function my_pmpro_mailchimp_listsubscribe_fields($fields, $user){ | |
| if( isset( $_REQUEST['discount_code'] ) && $_REQUEST['discount_code'] !== "" ){ | |
| $new_fields = array( | |
| "DISCOUNTC" => $_REQUEST['discount_code'], | |
| ); | |
| $fields = array_merge($fields, $new_fields); | |
| } | |
| return $fields; | |
| } | |
| add_action('pmpro_mailchimp_listsubscribe_fields', 'my_pmpro_mailchimp_listsubscribe_fields', 10, 2); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment