Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save phillipwilhelm/a85af145c706027b867835809cab2b11 to your computer and use it in GitHub Desktop.
Save phillipwilhelm/a85af145c706027b867835809cab2b11 to your computer and use it in GitHub Desktop.
Gravity Perks // GP Preview Submission // Business Hours Integration
<?php
/**
* Gravity Perks // GP Preview Submission // Business Hours Integration
*/
add_filter( 'gform_merge_tag_filter', function( $value, $input_id, $modifier, $field, $raw_value ) {
if( $field->type == 'business_hours' ) {
$value = GFBusinessHours::display_entry_field_value( $value, $field );
}
return $value;
}, 10, 5 );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment