=== Laterreta Migrator for Shopify ===
Contributors: laterretagames
Tags: shopify, woocommerce, migration, import, products
Requires at least: 6.0
Tested up to: 6.9
Stable tag: 1.0.7
Requires PHP: 8.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Migrate products, categories and images from Shopify to WooCommerce in a few clicks. Includes CORS configuration for decoupled/headless frontends.

== Description ==

**Laterreta Migrator for Shopify** connects to the Shopify Storefront API and imports your products, collections (as WooCommerce categories), product variants and multilingual translations (EN/ES/DE/FR) directly into WooCommerce. Image download (product and category thumbnails) is available in the Pro version.

= Features =

* Migrate unlimited products per run
* Import Shopify collections as WooCommerce categories
* Supports simple and variable products (variants)
* Multilingual product translations stored as meta (EN / ES / DE / FR)
* Skip or update already-imported products (detected by Shopify product ID)
* Migration history log
* Test Shopify connection before migrating
* Pro: Image download — product and category images downloaded from the Shopify CDN and stored in the WP media library
* Pro: Scheduled sync — automatically keeps prices, stock status and availability in sync with your Shopify store on a configurable schedule (hourly / daily / weekly)
* Pro: Custom metafields — map any Shopify metafield (namespace + key) to a WooCommerce product meta key; imported on migration and kept in sync automatically
* Pro: CORS / Headless settings — configure allowed origins for cross-origin requests
* Pro: Product visibility manager — choose which imported products to show or hide

= How it works =

1. Install and activate the plugin
2. Go to **Laterreta Migrator for Shopify → Settings** and enter your Shopify store domain and Storefront API token
3. Use **Laterreta Migrator for Shopify → Dashboard** to run the migration
4. Import categories first, then products (or use "Migrate All" for both)
5. Multilingual translations (EN/ES/DE/FR) are imported automatically. Image download requires Pro.

= Getting your Shopify Storefront API token =

1. Log in to your Shopify Admin
2. Go to **Apps → Develop apps → Create an app**
3. Under **Configuration → Storefront API** enable the required permissions
4. Under **API credentials** copy the **Storefront API access token**

A Pro version with priority support and advanced features is available at:
[laterretagames.com/migrate-from-shopify-to-woocommerce](https://www.laterretagames.com/migrate-from-shopify-to-woocommerce/)

== Installation ==

1. Upload the `laterreta-migrator-for-shopify` folder to `/wp-content/plugins/`
2. Activate the plugin through the **Plugins** menu in WordPress
3. Go to **Laterreta Migrator for Shopify → Settings** to configure your Shopify credentials

== Frequently Asked Questions ==

= Does this plugin work without WooCommerce? =

No. WooCommerce must be installed and active.

= What Shopify API version is used? =

The plugin uses the Shopify Storefront API (2025-07 by default). You can change this in Settings.

= Will it overwrite my existing WooCommerce products? =

No. Products that were previously imported from Shopify are detected by their Shopify ID and skipped by default. You can choose to update them instead in Settings.

= Does it support variable products? =

Yes. Shopify products with multiple variants are imported as WooCommerce variable products with their corresponding attributes and variations.

= Is it compatible with multilingual setups? =

The plugin stores EN/ES/DE/FR translations from Shopify as product meta fields that can be consumed by your frontend or translation plugin.

== External Services ==

This plugin connects to two external services operated by Shopify:

**1. Shopify Storefront API**
Used to fetch product and category data from your Shopify store. A request is made every time you run a migration from the plugin dashboard.
Data sent: your Shopify store domain and Storefront API access token (credentials you provide in the plugin settings).
Service provider: Shopify Inc.
Terms of Service: https://www.shopify.com/legal/terms
Privacy Policy: https://www.shopify.com/legal/privacy

**2. Shopify CDN (cdn.shopify.com)**
Used to download product images when you run the "Download Images" step. Images are fetched from Shopify's CDN and stored locally in your WordPress media library.
Data sent: HTTP GET requests to image URLs returned by the Shopify Storefront API. No personal data is sent.
Service provider: Shopify Inc.
Terms of Service: https://www.shopify.com/legal/terms
Privacy Policy: https://www.shopify.com/legal/privacy

No data is sent to any service operated by Laterreta / La Terreta Games.

== Screenshots ==

1. Dashboard — run migration and monitor progress
2. Settings — Shopify credentials and migration options
3. Migration history log
4. Installation guide

== Changelog ==

= 1.0.7 =
* Pro: Custom metafields — map any Shopify metafield to a WooCommerce product meta key via an editable table in a dedicated settings page; values are fetched on migration and kept in sync with the scheduled sync
* Complete ES / DE / FR translations for all admin strings
* Pro: Scheduled price, stock and availability sync (configurable frequency)

= 1.0.6 =
* Pro: Scheduled sync — automatically keeps prices, stock and availability in sync with Shopify on a configurable schedule
* Images (product and category thumbnails) moved to Pro — free version no longer downloads images from Shopify CDN
* Multilingual translations (EN/ES/DE/FR) remain fully available in the free version

= 1.0.5 =
* Fix: plugin settings and credentials are now preserved when upgrading from free to Pro
* Added uninstall.php — data is only deleted when the user explicitly chooses to remove it

= 1.0.4 =
* Images and multilingual translations (EN/DE/FR) are now downloaded and saved during migration — no Pro required
* "Update existing products" fully available in the free version
* Code quality: all AJAX response data in JS output via safe DOM .text() methods, not innerHTML
* Fix: admin scripts now load correctly on all plugin pages

= 1.0.2 =
* Renamed plugin prefix from swm_ to lmsf_ (4-char prefix per WordPress.org guidelines)
* Separated Pro-only code (images, CORS, visibility, translations) into includes/pro/ — physically absent from the free build

= 1.0.1 =
* Renamed plugin slug and main file to laterreta-migrator-for-shopify (matches WordPress.org slug)
* Renamed all internal prefixes from swm_ to lmsf_ (4-char prefix per WordPress.org guidelines)
* Separated Pro-only code into includes/pro/ — physically absent from the free/WordPress.org build

= 1.0.0 =
* Initial release
* Product and category migration from Shopify Storefront API
* Simple and variable product support
* Multilingual translations (EN/ES/DE/FR)
* Async image download
* CORS / Headless configuration

== Upgrade Notice ==

= 1.0.6 =
Image download (product and category thumbnails) is now a Pro-only feature. Free version functionality is otherwise unchanged.

= 1.0.0 =
Initial release.
