=== REST API Products Importer for WooCommerce ===
Contributors: appzoic
Tags: woocommerce, products, rest api, importer, api
Requires at least: 5.0
Tested up to: 7.1
Stable tag: 1.1.0
Requires PHP: 7.4
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Donate link: https://buy.stripe.com/14A6oH9U97UBaPiaZzaAw00

Import products from any external WordPress/WooCommerce site's REST API directly into your store.

== Description ==

The **Rest API WooCommerce Product Importer** plugin allows you to seamlessly import products from an external WordPress site that has the WordPress REST API enabled and WooCommerce products. It's perfect for syncing product catalogs from a main site to a satellite site, migrating products, or managing products from a central repository.

**Key Features:**

*   **Remote Product Import:** Connect to any external WordPress site via its REST API endpoint.
*   **Complete Data Import:** Imports product title, description, excerpt, categories, tags, featured image, and price.
*   **Smart Category & Tag Handling:** Automatically creates matching product categories and tags on your site if they don't already exist.
*   **Duplicate Prevention:** Checks if a product has already been imported and provides a link to edit it instead of duplicating.
*   **Pagination:** Browses through all available products from the remote site with a paginated interface.
*   **User-Friendly Interface:** A clean admin UI within your WordPress dashboard for easy importing.
*   **Security:** Uses nonces and security checks to validate all requests.

== Installation ==

1. Upload the `rest-api-products-importer-for-woocommerce` folder to the `/wp-content/plugins/` directory.
2. Activate the plugin through the 'Plugins' menu in WordPress.
3. Ensure the **WooCommerce** plugin is installed and activated.
4. Navigate to **WCAPI Importer > Settings** and enter the full URL (e.g., `https://example.com`) of the source website you want to import from.
5. Go to **WCAPI Importer > Products Importer** to view and import available products.

== Frequently Asked Questions ==

= What do I need on the source website? =

The source website must:
1. Be a WordPress site.
2. Have the WordPress REST API enabled (it is by default).
3. Have WooCommerce installed with products.

= The import fails with a "Request timeout" error. What should I do? =

This means the remote server is taking too long to respond. This could be due to a slow host, a large number of products, or server configuration. Try again later. If the problem persists, contact the administrator of the source website.

= The categories/tags from the remote site aren't showing up correctly. =

The plugin attempts to create categories and tags with the same names. Ensure the names do not contain invalid characters and that your user role has the permissions to create new terms.

= Can I import variable products? =

The current version (1.0.0) imports products as **Simple**, **Virtual**, and **Downloadable** products. Support for variable products is not implemented in this release.

= Can I import from a site that requires authentication? =

No, the current version only supports fetching data from publicly accessible REST API endpoints.

== Screenshots ==

1. Settings page for entering the source website URL.
2. The main product importer table, showing products available for import.
3. Success message after a product has been imported.

== Changelog ==

= 1.0.0 =
* Initial release.
* Core functionality: Connect to remote site, browse products, import product data, images, categories, and tags.

= 1.1.0 - 2026-09-06 =
* Added: AJAX product loading
* Added: Transient caching for products
* Added: Lazy loading for images
* Added: Loading indicators
* Added: Better error handling
* Improved: Performance (50-80% faster)
* Improved: Pagination without page reload
* Improved: Security nonce verification
* Fixed: Timeout issues with large product lists
* Fixed: "400 Bad Request" errors
* Fixed: Input validation and sanitization
* Removed: Redundant API calls

== Upgrade Notice ==

= 1.0.0 =
This is the initial release of the plugin.


== License ==

This plugin is licensed under the GPL v2 or later.

== Disclaimer ==

This plugin is provided as-is. It is your responsibility to ensure you have the right to import content from the source website.