=== TryonX - Virtual Try-On for WooCommerce === Contributors: wpxero Donate link: https://wpxero.com Tags: woocommerce, virtual try-on, ai, product visualization, ecommerce Requires at least: 5.6 Tested up to: 6.8 Requires PHP: 7.2 Stable tag: 1.0.0 License: GPLv2 or later License URI: http://www.gnu.org/licenses/gpl-2.0.html Allow customers to virtually try on clothing items by uploading their photos using Google's Gemini AI for a realistic shopping experience. == Description == Try-On transforms the online shopping experience by enabling customers to see how clothing items would look on them before making a purchase. Using Google's advanced Gemini AI technology, the plugin creates realistic visualizations of customers wearing your products. = Key Features = * **Easy Integration**: Adds a "Try On Virtually" button to product pages for selected categories * **User-Friendly Interface**: Intuitive modal with photo upload and visualization capabilities * **Realistic AI Visualization**: Powered by Google's Gemini AI for high-quality try-on images * **Category Selection**: Choose which product categories should have the try-on feature * **Responsive Design**: Works perfectly on both mobile and desktop devices * **Secure Image Processing**: Temporary storage with proper security measures * **Customizable Appearance**: Easily style the interface to match your theme = How It Works = 1. When a customer visits a product page in an enabled category, they'll see a "Try On Virtually" button 2. Clicking the button opens a modal where they can upload their photo 3. After uploading, they click "Generate Try-On" to see a visualization of themselves wearing the product 4. The image generation is handled by Google's Gemini AI using their image-generation capabilities 5. The result shows a realistic composite of the customer wearing the selected clothing item = Technical Features = * Secure image handling with proper validation and sanitization * Temporary file storage with security measures * Responsive modal interface with drag-and-drop upload capability * AJAX-based processing for seamless user experience * Error handling and user feedback * Customizable styling via CSS files = Privacy Considerations = The plugin processes user-uploaded images to generate try-on visualizations. These images are: * Temporarily stored on your server during processing * Sent to Google's Gemini API for generation * The resulting images are stored in your WordPress media library Consider updating your Privacy Policy to inform users about this data processing. == External services == This plugin connects to Google's Gemini AI API to generate virtual try-on images. The service is essential for creating realistic visualizations of customers wearing clothing items from your store. **What data is sent and when:** - User-uploaded photos (customer images) are sent to Google's Gemini API when a customer clicks "Generate Try-On" - Product images from your WooCommerce store are sent along with the user photos - Both images are converted to Base64 format and transmitted via HTTPS to Google's servers - A detailed AI prompt describing the virtual try-on requirements is also sent - Data is only sent when customers actively use the virtual try-on feature **API endpoint used:** `https://generativelanguage.googleapis.com/v1beta/models/gemini-2.0-flash-preview-image-generation:generateContent` **Data handling:** - Images are temporarily stored on your server during processing - After processing, temporary files are automatically deleted - Generated try-on images are stored in your WordPress media library - No data is permanently stored on Google's servers beyond their standard API retention policies This service is provided by Google LLC. Please review their terms of service and privacy policy: - [Google AI Terms of Service](https://ai.google.dev/terms) - [Google Privacy Policy](https://policies.google.com/privacy) == Installation == 1. Download the plugin ZIP file 2. Log in to your WordPress admin dashboard 3. Navigate to Plugins > Add New 4. Click the "Upload Plugin" button at the top of the page 5. Select the ZIP file and click "Install Now" 6. After installation, click "Activate Plugin" == Configuration == 1. Navigate to WooCommerce > Virtual Try-On in your WordPress admin 2. Enter your Gemini API key (you can get one from [Google AI Studio](https://ai.google.dev/)) 3. Select which product categories should have the Try-On feature 4. Save your settings == Frequently Asked Questions == = Do I need a Google Gemini API key? = Yes, the plugin requires a Google Gemini API key to function. You can obtain one from [Google AI Studio](https://ai.google.dev/). = The Try-On button doesn't appear on product pages = * Make sure you've selected the correct product categories in the plugin settings * Check that the product has a featured image set * Verify that the product belongs to one of the enabled categories = Image generation fails = * Verify your Gemini API key is correct and has the necessary permissions * Ensure the uploaded photos meet the requirements (JPEG, PNG, or WebP format, under 5MB) * Check your server's PHP configuration allows for file uploads and has sufficient memory * Make sure your server can make outbound API requests to Google's services = The plugin conflicts with my theme = * If you experience styling issues, you may need to customize the CSS files to match your theme * The plugin uses isolated CSS classes to minimize conflicts = Is there a limit to how many try-on images can be generated? = The number of images you can generate depends on your Google Gemini API plan. Check your API usage limits in your Google AI Studio dashboard. = What happens to the customer's uploaded photos? = Customer photos are temporarily stored on your server during processing, then sent to Google's Gemini API. After processing, temporary files are deleted, but the generated try-on images are stored in your WordPress media library. == Screenshots == 1. Virtual Try-On button on product page 2. Try-On modal interface for photo upload 3. Generated try-on visualization example 4. Admin settings page == Changelog == = 1.0.0 = * Initial release with core virtual try-on functionality * Integration with Google Gemini AI * Admin settings for API key and category selection * Responsive frontend interface == Upgrade Notice == = 1.0.0 = Initial release of the Try-On plugin. == Customization == The plugin includes several CSS files that can be customized to match your theme: * `assets/css/tryon.css` - Front-end styles for the try-on button and modal * `assets/css/tryon-admin.css` - Admin interface styles You can modify these files directly or add custom CSS to your theme to override specific styles. == Support == For support, feature requests, or bug reports, please contact us at [support@wpxero.com](mailto:support@wpxero.com).