flowcrafter_freeze_conditions
Description
Freeze condition data this class does not know about.
Flowcrafter only walks the flat rules list, because that is the only
part it owns. A plugin that stores its own rules elsewhere on the same
object has to freeze them here or they never resolve — the run parks
holding raw {{run.key}} text, compares it as a literal, matches
nothing, and expires a week later with no error anywhere.
GP Advanced Conditional Logic is the case in point: its groups live
under a sibling gpacl key, and the flat rules Flowcrafter can see are
only a mirror of its first group.
Usage
Freeze values stored by a condition extension.
add_filter( 'flowcrafter_freeze_conditions', 'my_custom_function' );Parameters
$frozen
array
The object with Flowcrafter’s own rules resolved.
$logic
array
The object as saved, before any freezing.
$resolve
callable
fn(string $raw): string.
Examples
Freeze values stored by a condition extension
add_filter( 'flowcrafter_freeze_conditions', function ( $frozen, $logic, $resolve ) {
$frozen['custom'] = $resolve( $logic['custom'] ?? '' );
return $frozen;
}, 10, 3 );Since
1.0-beta-1Hook added.