Filter the calculated word count for the current field.
This filter must be used with its JS counterpart to handle filtering the word count on submission.
add_filter( 'gpppw_word_count', 'my_custom_function' );
The calculated word count.
The string of words to be counted.
The Single Product field that has been configured to charge per word.
The field for which the number of words will be counted.
The current form object.
Pay Per Character
Change Pay Per Word’s behavior to charge per character instead of per word. This snippet must be paired with its JS counterpart.
Split Words on Specific Characters
In this example, Pay Per Word splits words on periods, underscores, and asterisks. This snippet must be paired with its JS counterpart.
This filter is available since Gravity Forms Pay Per Word 1.1.4.