MP_Addon_Hubspot::hubspot_send_from_lead_page()

Callback function to send lead data from the lead page.

Contents


Source Source

File: calculator-hubspot-add-on/inc/MP_Addon_Hubspot.php

    public function hubspot_send_from_lead_page()
    {
        MP_Callback::check_nonce($_REQUEST['nonce'], MortgagePlatform::$prefix . 'hubspot');

        $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_hubspot($lead);


        wp_die();
    }

Top ↑

Changelog Changelog

Changelog
Version Description
1.0.0 Introduced.