MP_Addon_Dynamics::dynamics_send_from_lead_page()

Callback function to send lead data from the lead page.

Contents


Source Source

File: calculator-dynamics-add-on/inc/MP_Addon_Dynamics.php

	public function dynamics_send_from_lead_page() {

		MP_Callback::check_nonce($_REQUEST['nonce'], MortgagePlatform::$prefix . 'dynamics');

		$post_ID = sanitize_text_field($_POST['id']);

		$lead = array(
			'lead' => $post_ID,
			'firstname' => get_post_meta($post_ID, MortgagePlatform::$prefix . 'lead_firstname', true),
			'secondname' => get_post_meta($post_ID,MortgagePlatform::$prefix . 'lead_secondname', true),
			'phone' => get_post_meta($post_ID,MortgagePlatform::$prefix . 'lead_phone', true),
			'email' => get_post_meta($post_ID,MortgagePlatform::$prefix . 'lead_email', true),
		);

		$this->set_lead_data_to_dynamics($lead);


		wp_die();

	}

Top ↑

Changelog Changelog

Changelog
Version Description
1.0.0 Introduced.