gpqr_encoding
Description
Filters the encoding used when generating QR codes. If you are using a non-English language, you may need
to change this to something like UTF-8
.
Usage
Filter the encoding used for all forms and shortcodes.
add_filter( 'gpqr_encoding', 'my_custom_function' );
Filter the encoding used for a specific form.
add_filter( 'gpqr_encoding_FORMID', 'my_custom_function' );
Parameters
encoding string
Encoding used. Defaults to
ISO-8859-1
.content string
Content being used to generate the code.
form array
The current form if the QR code is generated using a merge tag.
Examples
Change the encoding for all forms and shortcodes to use UTF-8 when generating QR codes
UTF-8 is a widely used encoding and supports virtually every different spoken and non-spoken languages.
add_filter( 'gpqr_encoding', function ( $encoding, $content, $form ) {
return 'UTF-8';
}, 10, 3 );
Since
This filter is available since Gravity Forms QR Code 1.0.4.