=== Entegal ===
Contributors: amirmohammadshahpoori
Tags: woocommerce, import, product import, rest api, migration
Requires at least: 6.5
Tested up to: 7.0
Requires PHP: 7.4
WC requires at least: 8.0
WC tested up to: 10.9
Stable tag: 1.0.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Transfer WooCommerce products between sites via the REST API, including categories, tags, attributes, images and variations.

== Description ==

**Entegal** ("transfer" in Persian) is an admin tool that lets you search, select and import products from another WooCommerce store (the source site) into your current store (the destination site), using the official [WooCommerce REST API](https://woocommerce.github.io/woocommerce-rest-api-docs/).

This plugin is built for store owners who want to:

* Move products between two WooCommerce sites they own or manage.
* Quickly populate a new store's catalog during a migration or relaunch.
* Keep full control over which parts of a product (categories, tags, attributes, images) get imported.

= Features =

* Connect to any WooCommerce site through the REST API using a Consumer Key and Consumer Secret.
* Search source-site products by name, SKU or category.
* Bulk-select products and import them with a live progress bar.
* Configurable options: download images, update existing products, import categories, tags and attributes.
* Support for simple and variable products, including all variations.
* Automatic detection of already-imported products (using a source-ID reference) to avoid duplicates.
* Full activity log of the import process, shown directly on the admin page.

= Requirements =

* WooCommerce must be active on the destination site (where this plugin is installed).
* A REST API key with at least "Read" access must be created on the source site (WooCommerce → Settings → Advanced → REST API).

This plugin does not send any data to third-party servers. All requests happen directly between your site and the source site that you configure yourself.

The admin interface of this plugin is currently available in Persian (Farsi). Translation contributions are welcome through translate.wordpress.org.

== Installation ==

1. Upload the plugin to the `/wp-content/plugins/entegal` directory, or install it through the "Plugins → Add New" screen in WordPress.
2. Activate the plugin (WooCommerce must already be installed and active).
3. Go to the "Entegal" menu in the WordPress admin sidebar.
4. Enter the source site URL and the Consumer Key / Consumer Secret, then save.
5. Click "Test Connection" to confirm everything works.
6. Search, select and import products.

== Frequently Asked Questions ==

= Does this plugin send any data to Automattic or any other third-party service? =

No. All communication happens only between your site (where the plugin is installed) and the site you configure as the "source site".

= How do I create a REST API key on the source site? =

On the source site, go to WooCommerce → Settings → Advanced → REST API and create a new key with "Read" access.

= Are variable products supported? =

Yes. Variable products are imported together with all their variations, prices, stock levels and images.

= What happens if a product has already been imported? =

The plugin stores the source product ID in post meta and uses it to detect whether a product was already imported. If "Update existing products" is enabled, the existing product is updated; otherwise it is left untouched.

== Screenshots ==

1. Connection settings and import options screen.
2. Source-site product search and list, with bulk selection.
3. Live progress bar and activity log during import.

== Changelog ==

= 1.0.0 =
* First public release in the WordPress.org plugin directory.
* Fixed a settings-saving bug: checkbox options (import categories, tags, attributes, etc.) now correctly persist the "off" value.
* Added full internationalization (i18n) support for all admin-interface strings.
* Fixed potential XSS issues when rendering data received from the source site (product name, category name, etc.) by escaping all client-side output.
* Removed debug `console.log()` calls that exposed API credentials in the browser console.
* Added `uninstall.php` to clean up stored settings when the plugin is deleted.
* Replaced a direct database query with a cached `get_posts()` lookup.
* Replaced the discouraged `unlink()` call with `wp_delete_file()`.

== Upgrade Notice ==

= 1.0.0 =
First public release of this plugin under the name Entegal (previously named Woo Product Importer).
