Alert: This function’s access is marked private. This means it is not intended for use by plugin or theme developers, only in other core functions. It is listed here for completeness.
MP_Addon_Google_Spreadsheets::prepare_multiple_lead_data( array $data )
Prepare lead data to export as multiple raws to Google Spreadsheets.
Contents
Parameters Parameters
- $data
-
(array) (Required) lead IDs
Return Return
(array) $lead prepare lead data
Source Source
File: calculator-google-spreadsheets-add-on/inc/MP_Addon_Google_Spreadsheets.php
private function prepare_multiple_lead_data($data){
$lead = array();
foreach ( $data as $lead_id ) {
$data = array(
get_post_meta($lead_id, MortgagePlatform::$prefix . 'lead_firstname', true),
get_post_meta($lead_id,MortgagePlatform::$prefix . 'lead_secondname', true),
get_post_meta($lead_id,MortgagePlatform::$prefix . 'lead_phone', true),
get_post_meta($lead_id,MortgagePlatform::$prefix . 'lead_email', true),
get_post_meta($lead_id,MortgagePlatform::$prefix . 'lead_zipcode', true),
get_post_meta($lead_id,MortgagePlatform::$prefix . 'lead_yearofbirth', true),
get_post_meta($lead_id,MortgagePlatform::$prefix . 'lead_investmentamount', true)
);
array_push($lead, $data);
}
/**
* Action lead data to Google Spreadsheets.
* @since 1.0.0
*
* @param array $data {
* Lead data.
*
* @type string 'firstname' lead first name
* @type string 'secondname' lead second name
* @type string 'email' lead email
* @type string 'phone' lead phone
* @type string 'zipcode' lead zip code
* @type string 'yearofbirth' lead year of birth
* @type string 'investmentamount' investment amount
*
* }
*/
do_action('lead_to_google_spreadsheets',$lead);
return $lead;
}
Changelog Changelog
| Version | Description |
|---|---|
| 1.0.0 | Introduced. |