Skip to content

Instantly share code, notes, and snippets.

@scyt
Created December 9, 2022 20:25
Show Gist options
  • Save scyt/78f3a5a9eadeb722a398859f44099122 to your computer and use it in GitHub Desktop.
Save scyt/78f3a5a9eadeb722a398859f44099122 to your computer and use it in GitHub Desktop.
Prepend Live Merge Tags with Dash Character
<?php
// Update "123" with your form ID and "4" with your source field ID.
add_filter( 'gppa_live_merge_tag_value_123_4', function( $value, $merge_tag, $form, $field_id, $entry_values ) {
if ( !$value ) {
return $value;
}
return "-" . $value;
}, 10, 5 );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment