Last active
March 3, 2026 07:54
-
-
Save ihslimn/f634a7c32c731e2be3ae17260e46adb7 to your computer and use it in GitHub Desktop.
JetSmartFilters Add option like '1000+' to check range
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| add_filter( 'jet-smart-filters/filters/filter-options', function( $options, $filter_id ){ | |
| $filter_list = array( | |
| '269396' => true | |
| ); | |
| if ( ! isset( $filter_list[ $filter_id ] ) ) { | |
| return $options; | |
| } | |
| foreach ( $options as $key => $label ) { | |
| $pair = explode( ' — ', $label ); | |
| if ( intval( $pair[1] ) === 9999999 ) { | |
| $options[ $key ] = $pair[0] . '+'; | |
| } | |
| } | |
| return $options; | |
| }, 999, 2 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment