Changeset 2039422
- Timestamp:
- 02/26/2019 06:45:33 AM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
mplus-intercom-subscription/trunk/classes/mplus-intercom-subscription-handler.php
r1917369 r2039422 125 125 } 126 126 } 127 127 128 128 do_action( 'mplus_intercom_subscription_user_created_after', $new_user, $submitted_fields ); 129 129 … … 145 145 $basic['unsubscribed_from_emails'] = true; 146 146 foreach ( $fields as $field ) { 147 if ( $field['intercom_attribute'] == 'unsubscribed_from_emails' ) { 148 $field['value'] = false; 149 } 150 if ( $field['attribute_type'] == 'basic' ) { 151 $basic[ $field['intercom_attribute'] ] = $field['value']; 152 } elseif ( $field['attribute_type'] == 'custom' ) { 153 $custom[ $field['intercom_attribute'] ] = $field['value']; 154 } else { 147 if( array_key_exists( 'intercom_attribute', $field ) ) { 148 if ( $field['intercom_attribute'] == 'unsubscribed_from_emails' ) { 149 $field['value'] = false; 150 } 151 if ( $field['attribute_type'] == 'basic' ) { 152 $basic[ $field['intercom_attribute'] ] = $field['value']; 153 } elseif ( $field['attribute_type'] == 'custom' ) { 154 $custom[ $field['intercom_attribute'] ] = $field['value']; 155 } else { 155 156 157 } 156 158 } 157 159 } 158 $basic['custom_attributes'] = $custom; 160 if( ! empty( $custom ) ) { 161 $basic['custom_attributes'] = $custom; 162 } 159 163 return $basic; 160 164
Note: See TracChangeset
for help on using the changeset viewer.