wpcf7_constant_contact_save_contact_form()CF7 1.0

Saves the constant_contact property value.

Хуков нет.

Возвращает

null. Ничего (null).

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

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

Код wpcf7_constant_contact_save_contact_form() CF7 5.9.8

function wpcf7_constant_contact_save_contact_form( $contact_form ) {
	$service = WPCF7_ConstantContact::get_instance();

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

	$prop = isset( $_POST['wpcf7-ctct'] )
		? (array) $_POST['wpcf7-ctct']
		: array();

	$prop = wp_parse_args(
		$prop,
		array(
			'enable_contact_list' => false,
			'contact_lists' => array(),
		)
	);

	$contact_form->set_properties( array(
		'constant_contact' => $prop,
	) );
}