=== Limbo ===
Contributors: brunopastorelli, limbobp
Tags: woocommerce, products, import, export
Requires at least: 5.0
Tested up to: 6.8
Stable tag: 1.0.3
Requires PHP: 7.2
License: GPLv2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html

A WooCommerce extension to manage connections and products via a custom admin interface.

== Description ==
Limbo for WooCommerce allows WooCommerce store owners to manage product connections and synchronize their inventory with the Limbo platform.

== Installation ==
1. Upload the plugin files to `/wp-content/plugins/limbo-plugin`
2. Activate the plugin through the 'Plugins' menu in WordPress
3. Ensure WooCommerce is installed and activated
4. Configure the plugin settings

== External Services ==

= 1. Limbo API (www.serverlimbo.com) =
Used for product synchronization and management.

Authentication:
- All API requests require a valid Limbo seller authentication token
- Token should be included in the Authorization header
- Format: `Authorization: Bearer <token>`

API Endpoints:

1. Get Limbo Product ID
   - Endpoint: `/seller/woocommerce/get-limbo-product-id`
   - Method: GET
   - Parameters:
     * `product_id`: WooCommerce product ID
   - Response: Limbo platform product ID

2. Get Products By Seller ID
   - Endpoint: `/seller/productsBySellerId/{id}`
   - Method: GET
   - Parameters:
     * `id`: Seller ID (path parameter)
   - Response: Array of seller's products

3. Create Connection
   - Endpoint: `/seller/woocommerce/create-connection`
   - Method: POST
   - Parameters:
     * `store_domain`: WooCommerce store domain
     * `seller_id`: Limbo seller ID
   - Response: Connection status and details

4. Create Limbo Products
   - Endpoint: `/seller/woocommerce/create-limbo-products`
   - Method: POST
   - Parameters:
     * Product data (name, price, description, images)
   - Response: Created product details

= 2. Limbo Public Platform (www.uselimbo.com) =
Used for public product display.

Public API Endpoints:

1. Get Public Product
   - Endpoint: `/public/product/{id}`
   - Method: GET
   - Parameters:
     * `id`: Product ID (path parameter)
   - Response: Public product information
   - No authentication required

== Technical Specifications ==

= External Services & Dependencies =

This plugin connects to the following external services:

1. LIMBO Authentication Service
   - Domain: serverlimbo.com
   - Purpose: Handles seller authentication via Google OAuth
   - Data transmitted: User authentication credentials
   - Frequency: On user login/authentication only

2. LIMBO API Service
   - Domain: limbocookiejar.com
   - Purpose: User data management and session handling
   - Endpoints used:
     * /get-user-data: Fetches user profile and permissions
   - Data transmitted: User session data
   - Frequency: On admin page load and after authentication

3. LIMBO CDN & Storage
   - Purpose: Product image storage and delivery
   - Data stored: 
     * Product images (processed and optimized)
     * Product data cache
   - Retention: 30 days after disconnection
   - Security: TLS 1.2+ encryption in transit

= Service Infrastructure =

1. LIMBO Platform Service (serverlimbo.com)
   - Primary API endpoint for all product operations
   - Handles seller authentication via Google OAuth
   - Manages product synchronization
   - Processes inventory updates
   - Handles image optimization
   Required for: All core platform functionality

2. LIMBO Cookie Service (limbocookiejar.com)
   - Manages authentication tokens and sessions
   - Handles secure cookie storage
   - Maintains user session state
   - Provides cross-domain authentication
   Required for: User authentication persistence

= Data Flow & Security =

1. Authentication Flow
   - User initiates login via serverlimbo.com
   - Google OAuth authentication processed
   - Authentication token stored securely via limbocookiejar.com
   - Session maintained across domains

2. API Communication
   - All API requests made to serverlimbo.com
   - Requests authenticated using stored token from limbocookiejar.com
   - Real-time product and inventory synchronization
   - Secure image processing and optimization

3. Security Measures
   - All connections use HTTPS/TLS 1.2+
   - Cross-domain authentication handled securely
   - Regular security audits performed
   - No sensitive customer data transmitted

= Service Requirements =

* Active LIMBO seller account required
* Valid API credentials needed
* Stable internet connection for real-time sync
* Outbound connections allowed to:
  - *.serverlimbo.com (API and authentication)
  - *.limbocookiejar.com (Session management)

= Data Flow =

1. Authentication
   - Users authenticate through serverlimbo.com
   - OAuth 2.0 protocol with Google
   - Secure token storage in WordPress database

2. Product Sync
   - Bi-directional sync between WooCommerce and LIMBO
   - Real-time updates for inventory and pricing
   - Automated image optimization and CDN distribution

3. Data Security
   - All API communications use HTTPS
   - Data encrypted in transit using TLS 1.2+
   - Regular security audits performed
   - No sensitive customer data transmitted to external services

= Privacy Considerations =

* User data is processed according to our Privacy Policy at www.uselimbo.com/policy
* Seller credentials are encrypted in WordPress database
* No customer payment information is shared with external services
* GDPR compliant data processing and storage
* Data removal available upon account deletion

= Service Status =

Users can check the current status of LIMBO services at:
www.uselimbo.com/policy

= File Handling =

Product Images:
- Supported formats: JPG, PNG, WebP
- Maximum file size: 5MB per image
- Images are processed and stored on Limbo servers
- Local copies maintained in WooCommerce media library

Import/Export Files:
- Product data can be exported in JSON format
- Import supports CSV and JSON formats
- File size limit: 10MB
- Character encoding: UTF-8

= Data Privacy & Security =

Data Storage:
- Product data stored on both WooCommerce and Limbo servers
- Images cached on Limbo CDN for performance
- Seller credentials encrypted in WordPress database

Data Transmission:
- All API communications use HTTPS
- Data encrypted in transit using TLS 1.2+
- Regular security audits performed

Data Retention:
- Product data retained while connection is active
- Data removed from Limbo servers 30 days after disconnection
- Image cache cleared within 24 hours of product deletion

= Product Image Handling =

1. External Image Processing
   - Product images are processed and optimized on LIMBO servers
   - Optimized images are required for WooCommerce product creation
   - Images are served through LIMBO's CDN for improved performance
   - Original images are stored securely and backed up

2. Why External Images Are Necessary
   - Products created through LIMBO require their images to be processed and stored on our servers
   - This enables:
     * Consistent image quality across all sales channels
     * Optimized image delivery for better performance
     * Automatic image format conversion and resizing
     * Synchronized product updates across multiple stores
   - Images remain available even if the original source becomes unavailable

3. Image Flow Process
   - Original images uploaded through WooCommerce or LIMBO platform
   - Images processed and optimized on LIMBO servers
   - Optimized versions stored on LIMBO CDN
   - WooCommerce products created/updated with CDN image URLs
   - Local copies maintained in WooCommerce media library as backup

4. Image Technical Specifications
   - Supported formats: JPG, PNG, WebP
   - Maximum upload size: 5MB per image
   - Images automatically optimized for web delivery
   - Multiple sizes generated for different display contexts
   - High-availability CDN ensures reliable image delivery

5. Image Security & Privacy
   - All image transfers encrypted using TLS 1.2+
   - Access controlled via authenticated CDN URLs
   - Regular security audits of storage systems
   - Compliance with data privacy regulations
   - Images removed from CDN 30 days after product deletion

This external image handling is an essential part of the LIMBO service, ensuring consistent product presentation and reliable image delivery across all sales channels while maintaining optimal performance and security.

== Frequently Asked Questions ==

= Does this plugin require WooCommerce? =
Yes, WooCommerce must be installed and activated.

= Does this plugin require an external service account? =
Yes, you need a Limbo seller account to use this plugin. Visit www.uselimbo.com to create an account.

= What data is shared with external services? =
The following data is shared with Limbo's servers:
- Product information (name, price, description, images)
- Store domain
- Seller ID
- Product inventory levels

== Privacy ==
This plugin connects to external Limbo servers for product synchronization. Please review Limbo's privacy policy at www.uselimbo.com/policy for details on data handling.

== Changelog ==
= 1.0.2 =
* Added new features and improved existing ones
* Fixed bugs and enhanced overall functionality
* Updated documentation and added more detailed instructions
* Improved user interface and usability
* Added new configuration options
* Enhanced security measures and data protection
* Initial release
