Skip to content

Commit

Permalink
clean compare value
Browse files Browse the repository at this point in the history
  • Loading branch information
picocodes committed Oct 9, 2023
1 parent 4385a01 commit f3927bd
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -478,7 +478,7 @@ public function is_rule_valid_for_args( $rule, $args, $subject, $action ) {
foreach ( $rule->conditional_logic['rules'] as $rule ) {

$current_value = $smart_tags->replace_in_text_field( '[[' . $rule['type'] . ']]' );
$compare_value = $rule['value'];
$compare_value = noptin_clean( $rule['value'] );
$comparison = $rule['condition'];

// If the rule is met.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -206,6 +206,10 @@ public function init_trigger( $form_id, $posted ) {
$posted = is_array( $posted ) ? $posted : array();
$posted['form'] = $form_id;

if ( empty( $posted['source'] ) ) {
$posted['source'] = $this->category;
}

// Adds the current user info.
$current_user = wp_get_current_user();
$posted['current_user_email'] = $current_user->user_email;
Expand Down

0 comments on commit f3927bd

Please sign in to comment.