DOG ID Tags - QR Code Pet Identification
A comprehensive WordPress plugin for WooCommerce that enables the creation of custom pet identification tags with QR codes that link to dynamic online profiles.
by Aliyan Faisal · github.com/aliyanfaisal/dog-id-tags-qr-code-pet-identification-plugin · website
Install
No release zip yet. The repository archive installs, but the folder name will carry the branch suffix and updates will not flow:
wp plugin install https://github.com/aliyanfaisal/dog-id-tags-qr-code-pet-identification-plugin/archive/refs/heads/master.zipA comprehensive WordPress plugin for WooCommerce that enables the creation of custom pet identification tags with QR codes that link to dynamic online profiles.
Features
🐕 Core Functionality
- QR Code Generation: Automatically generates unique QR codes for each pet profile
- Dynamic Profiles: Creates customizable online profiles for pets with owner information
- WooCommerce Integration: Seamlessly integrates with WooCommerce for product sales
- Category Management: Select which product categories should have DOG ID features
- Custom Forms: Beautiful, responsive forms for customer data collection
🎨 Admin Features
- Sleek Admin Interface: Modern, user-friendly admin settings page
- Category Selection: Easy selection of product categories for DOG ID features
- Custom Styling: Customize form colors and appearance
- Product Notes: Add custom notes that appear on product pages
- QR Code Settings: Configure QR code size and format
📝 Customer Experience
- Multi-step Forms: Organized form sections for personal and pet information
- Image Upload: Allow customers to upload pet photos
- Phone Number Repeater: Add multiple phone numbers
- Rich Text Editors: For special and medical notes
- Token Generation: Auto-generated unique tokens for each profile
- Responsive Design: Mobile-friendly forms and profiles
📱 Profile Management
- Public Profiles: Viewable pet profiles with QR codes
- User Dashboard: Customers can view all their pet profiles
- Profile Status: Active, deactivated, lost, or replaced status
- Print & Share: Easy profile printing and sharing options
- Download QR Codes: Download generated QR codes
Installation
- Upload the
dog-id-tagsfolder to the/wp-content/plugins/directory - Activate the plugin through the 'Plugins' menu in WordPress
- Navigate to DOG ID Tags in the WordPress admin menu
- Configure your settings and select product categories
Requirements
- WordPress 5.0 or higher
- WooCommerce 5.0 or higher
- PHP 7.4 or higher
- MySQL 5.6 or higher
Configuration
1. General Settings
- Product Note: Add a custom note that appears on DOG ID product pages
- Enabled Categories: Select which product categories should have DOG ID features
2. Form Appearance
- Background Color: Customize form background color
- Text Color: Set form text color
- Button Color: Customize button colors
- Custom CSS: Add custom CSS for advanced styling
3. QR Code Settings
- Size: Set QR code dimensions (100-1000 pixels)
- Format: Choose between PNG or SVG formats
Usage
For Administrators
-
Setting Up Categories:
- Go to DOG ID Tags → Settings
- Select product categories that should have DOG ID features
- Add a product note that will appear on product pages
- Customize form appearance and colors
-
Managing Profiles:
- View all created pet profiles in the database
- Monitor order completion and profile creation
- Manage customer data and QR codes
For Customers
-
Purchasing Process:
- Add DOG ID product to cart
- Complete checkout process
- On thank you page, complete the pet profile form
- Upload pet photos and provide detailed information
-
Profile Features:
- View pet profile with QR code
- Download QR code image
- Share profile link with others
- Print profile for offline use
Shortcodes
[dog_id_profile]
Display a pet profile by token or ID.
Parameters:
token: Unique profile tokenid: Profile ID
Example:
[dog_id_profile token="ABC123DEF456GHI7"]
[dog_id_qr_code]
Display a QR code for a specific profile.
Parameters:
profile_id: Profile IDtoken: Unique profile tokensize: QR code size (small, medium, large)show_download: Show download button (true/false)
Example:
[dog_id_qr_code profile_id="123" size="large" show_download="true"]
[dog_id_user_profiles]
Display all profiles for the current logged-in user.
Example:
[dog_id_user_profiles]
Database Structure
The plugin creates the following database tables:
wp_dog_id_pet_profiles
id: Primary keyorder_id: WooCommerce order IDuser_id: WordPress user IDproduct_id: Product IDunique_token: Unique identifierstatus: Profile status (active, deactivated, lost, replaced)created_date: Creation timestampupdated_date: Last update timestamp
wp_dog_id_pet_info
id: Primary keyprofile_id: Foreign key to pet_profilespet_name: Pet's namespecies: Animal speciesbreed: Pet breedspecial_notes: Additional notesmedical_notes: Medical informationimage_urls: Serialized image URLs
wp_dog_id_owner_info
id: Primary keyprofile_id: Foreign key to pet_profilesowner_name: Owner's full nameaddress: Contact addressphone_numbers: Serialized phone numbersemail: Email addresslanguage: Preferred language
wp_dog_id_qr_codes
id: Primary keyprofile_id: Foreign key to pet_profilesqr_code_data: QR code dataqr_code_image: Base64 encoded imageqr_code_format: Image format (png/svg)generated_date: Creation timestamp
Hooks and Filters
Actions
dog_id_profile_created: Fired when a new profile is createddog_id_qr_code_generated: Fired when a QR code is generateddog_id_form_submitted: Fired when customer form is submitted
Filters
dog_id_form_fields: Filter form fieldsdog_id_profile_data: Filter profile data before savingdog_id_qr_code_size: Filter QR code dimensions
Security Features
- Nonce Verification: All AJAX requests use WordPress nonces
- Data Sanitization: All user inputs are properly sanitized
- File Upload Validation: Strict file type and size validation
- SQL Injection Protection: Prepared statements for database queries
- XSS Protection: Output escaping for all displayed data
Styling and Customization
CSS Classes
The plugin uses isolated CSS classes with the dog-id- prefix to prevent conflicts:
.dog-id-isolated: Main isolation container.dog-id-customer-form-container: Form container.dog-id-profile-container: Profile display container.dog-id-qr-code: QR code wrapper.dog-id-product-note: Product note styling
Custom CSS
Add custom CSS in the admin settings under "Custom CSS" or use the provided hooks to modify styling.
Troubleshooting
Common Issues
-
QR Code Not Generating:
- Check if GD library is installed on your server
- Verify write permissions for upload directories
- Ensure external API access is allowed
-
Form Not Submitting:
- Check JavaScript console for errors
- Verify nonce verification is working
- Ensure required fields are filled
-
Styles Not Applied:
- Check if CSS files are properly enqueued
- Verify no theme conflicts with isolation classes
- Clear browser cache
Debug Mode
Enable WordPress debug mode in wp-config.php:
define('WP_DEBUG', true);
define('WP_DEBUG_LOG', true);
define('WP_DEBUG_DISPLAY', false);
Support
For support and feature requests, please contact the development team.
License
This plugin is licensed under the GPL v2 or later.
Changelog
Version 1.0.0
- Initial release
- Basic QR code generation
- Customer form functionality
- Admin settings page
- WooCommerce integration
- Profile management system