gform_pre_notification_deactivated

Description

The gform_pre_notification_deactivated action in Gravity Forms is triggered before a notification is deactivated, allowing further actions to be performed.

Usage

add_action( 'gform_pre_notification_deactivated', 'my_function', 10, 2 );

Parameters

ParameterTypeDescription
$notification_idintThe ID of the notification being deactivated.
$formarrayThe form object.

Examples

Perform an action before a notification is deactivated.

function my_function() {
	//Do something here
}
add_action( 'gform_pre_notification_deactivated', 'my_function', 10, 2 );

Placement

This code can be used in the functions.php file of the active theme, a custom functions plugin, a custom add-on, or with a code snippets plugin.

See also the PHP section in this article: Where Do I Put This Code?

Source Code

This action hook is located in forms_model.php.