Wallet Pass Generator for Gravity Forms
Wallet Pass Generator for Gravity Forms
Description
A secure, dynamic solution for generating Apple Wallet passes from Gravity Forms entries. This plugin allows administrators to map form fields directly to Apple Wallet pass locations including Primary, Secondary, Auxiliary, Header, and Back fields.
Configuration
- Global Settings: Navigate to the Wallet Pass global settings page. Enter your Apple Team ID, Pass Type ID, and the absolute server path to your
.p12certificate file. - Form Setup: Open a specific Gravity Form and navigate to Settings > Wallet Pass.
- Primary Field: Map a label and a field source. This field is required to generate a valid pass.
- Optional Fields: Provide labels for Header, Secondary, Auxiliary, or Back fields. If a label is left blank, that specific field will be omitted from the generated pass.
- Visuals: Specify absolute paths for your logo and icon. For best results, use 320×100 PNG for logos and 58×58 PNG for icons.
- QR Code: Enter a URL or text in the QR Code Message field to enable the barcode on the pass.
Troubleshooting
Common Error: OpenSSL “invalid key length”
If you see this error on modern hosting (like SiteGround), it means your .p12 file is using older encryption that OpenSSL 3.x rejects by default.
To fix this, perform the “2-Step Legacy to Modern AES” conversion on your Mac Terminal:
-
Unpack the original file (requires your Keychain password):
openssl pkcs12 -in YourCert.p12 -nodes -out temp.pem -
Repack it using Modern AES-256 encryption:
openssl pkcs12 -export -in temp.pem -out YourCert_Fixed.p12 -certpbe AES-256-CBC -keypbe AES-256-CBC -macalg SHA256 -
Upload YourCert_Fixed.p12 to your server and update the password in settings.
Error: “Could not find private key”
This occurs if you only exported the Certificate from Keychain Access.
Fix: In Keychain Access, click the arrow (▶) next to the certificate to reveal the Private Key. Highlight BOTH items before selecting “Export”.
Installation
- Upload the plugin folder to the
/wp-content/plugins/directory. - Activate the plugin through the ‘Plugins’ menu in WordPress.
- Ensure your Apple
.p12certificate is moved to the secure directory:wp-content/uploads/wp4gf/.
Faq
Use the {wp4gf_download_link} merge tag in your Gravity Forms confirmations or email notifications.
Ensure the Primary Field label and value are set, and verify that your .p12 path and password are correct in the global settings.
Reviews
Changelog
1.7.9
- Security Hardening: Implemented WPCS-compliant file validation, sanitization, and output escaping.
- Modular Architecture: Refactored settings into dedicated Global and Form-specific classes for better stability.
- Smart Asset Handling: Enhanced PKPass Factory with automatic URL-to-Path conversion for logos and icons.
- Enhanced Diagnostics: Added real-time “Readability Status” indicators for certificate paths in Global Settings.
- UI Refinement: Restored Live Preview with localized JS variables and simplified the visual asset fields.
- Logic Update: Implemented conditional Auxiliary field display based on QR code presence.
- Jump in Version Numbeer is due to development offline and refactoring
1.2.4
- Enforced Primary field as a required setting.
- Added conditional logic to hide optional fields if labels are empty.
1.2.3
- Updated Preview CSS for vertical field alignment.
- Implemented white-background and black-border styling for the admin preview.
1.2.2
- Converted Back Field to a textarea for multi-line support and merge tag compatibility.
1.2.1
- Major UI overhaul: Replaced dynamic mapping table with fixed, individual field sections for better stability.
1.0.0
- Initial release.