Heads up!
This article contains PHP code and is intended for developers. We offer this code as a courtesy, but don't provide support for code customizations or 3rd party development.
This article contains PHP code and is intended for developers. We offer this code as a courtesy, but don't provide support for code customizations or 3rd party development.
Use this hook to filter the On Submit actions that meet the conditional logic.
Usage
add_filter('frm_get_met_on_submit_actions', 'frm_exclude_on_submit_actions', 10, 2);
Parameters
- $met_actions (array): Array of actions that meet the conditional logics.
- $args (array): See FrmFormsController::run_success_action() for more information.
- $args['event'] is also added to this parameter.
Examples
Exclude some On Submit actions
Use this code example to exclude some On Submit actions that doesn't meet the conditional logic.
add_filter('frm_get_met_on_submit_actions', 'frm_exclude_on_submit_actions', 10, 2);
function frm_exclude_on_submit_actions( $met_actions, $args ) {
foreach ( $met_actions as $index => $action ) {
if ( 10 == $action->ID ) {
unset( $met_actions[ $index ] );
}
}
return $met_actions;
}