wpcf7_sendinblue_doi_default_optin_callback()CF7 1.0

Default optin_callback function.

Хуков нет.

Возвращает

null. Ничего.

Использование

wpcf7_sendinblue_doi_default_optin_callback( $properties );
$properties (обязательный)
-

Код wpcf7_sendinblue_doi_default_optin_callback() CF7 5.6.2

function wpcf7_sendinblue_doi_default_optin_callback( $properties ) {
	$service = WPCF7_Sendinblue::get_instance();

	if ( ! $service->is_active() ) {
		return;
	}

	if ( ! empty( $properties['contact'] ) ) {
		$contact_id = $service->create_contact( $properties['contact'] );

		if ( $contact_id and ! empty( $properties['email'] ) ) {
			$service->send_email( $properties['email'] );
		}
	}
}