Skip to content

Commit

Permalink
break if first rule don’t match
Browse files Browse the repository at this point in the history
  • Loading branch information
Damian Logghe committed Sep 11, 2017
1 parent ac6f0de commit 6525c2c
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions includes/class-geotr-rules.php
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,9 @@ public static function do_redirection( $rules = '' ) {
$match = apply_filters( 'geotr/rules/rule_match/' . $rule['param'], $rule );
if ( ! $match ) {
$match_group = false;
// if one rule fails we don't need to check the rest of the rules in the group
// that way if we add geo rules down it won't get executed and will save credits
break;
}
}
}
Expand Down

0 comments on commit 6525c2c

Please sign in to comment.