=== Smacks! Simple Importer ===
Contributors: simpleimporter
Tags: import, csv, woocommerce, bulk, custom post type
Requires at least: 6.0
Tested up to: 7.0
Requires PHP: 7.4
Stable tag: 0.1.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Bulk import products, posts, pages, custom post types, and media from CSV, XLSX, XML, or JSON files with drag-and-drop column mapping.

== Description ==

Smacks! Simple Importer brings content into WordPress and WooCommerce in bulk. Upload a CSV, XLSX, XML, or JSON file, drag your columns onto the target fields, and run the import. The plugin handles posts, pages, custom post types, media library items, and WooCommerce simple products.

= What it imports =

* Simple WooCommerce products (SKU, name, prices, stock, categories, tags, brands, images, status, custom attributes)
* WordPress posts (title, content, excerpt, author, date, categories, tags, featured image)
* WordPress pages (with parent/child hierarchy, page templates, menu order)
* Any registered custom post type
* Media library items (images and files from URLs with titles, alt text, captions)
* Custom post meta via the `meta:` prefix syntax
* Custom taxonomies via the `tax:` prefix syntax
* Yoast SEO fields (when Yoast is active), including title, meta description, focus keyword, canonical URL, and Open Graph fields

= Source file formats =

* CSV (comma, semicolon, tab — auto-detected)
* XLSX (Microsoft Excel)
* XML (with auto-detection of the repeating element)
* JSON (top-level array, NDJSON, or wrapped in a single "items" key)

= How it works =

1. Choose your content type (products, posts, pages, custom post type, or media).
2. Upload your CSV / XLSX / XML / JSON file.
3. Map columns onto target fields. Auto-mapping suggests matches based on common header names.
4. Pick an update mode (insert, update existing, update only) and a match key (SKU, slug, title, ID).
5. Watch the import run in the background. Cancel any time. Logs show what happened for every row.

= Idempotent re-imports =

Each content type has a sensible match key by default (SKU for products, slug for posts/pages/CPTs, URL for media). When a row matches an existing record, the importer updates it instead of creating a duplicate.

= Background processing =

Imports run through Action Scheduler (bundled with WooCommerce, or available as a standalone plugin). Large files are processed in batches so PHP timeouts don't break the import. You can close the tab and come back later.

= Templates =

The plugin includes downloadable starter templates for each content type, generated in CSV, XLSX, XML, and JSON formats so you can see the expected column shape.

= Privacy =

The plugin does not send any data to external services. All imports are processed locally on your WordPress installation. No tracking, no analytics, no callouts.

== Installation ==

1. Upload the plugin files to `/wp-content/plugins/smacks-simple-importer/`, or install through the WordPress Plugins screen.
2. Activate the plugin through the Plugins screen in WordPress.
3. Go to **Smacks! Importer** in the admin menu.
4. WooCommerce is optional. If you have it active, you can import products. If you don't, you can still import posts, pages, custom post types, and media.

Action Scheduler is required for background processing. It ships with WooCommerce. If you don't have WooCommerce installed, you can install the standalone Action Scheduler plugin instead.

== Frequently Asked Questions ==

= Does it require WooCommerce? =

No. WooCommerce is only needed for product imports. Posts, pages, custom post types, and media work on any WordPress site.

= How big a file can I import? =

There's no hard limit set by the plugin. Practical limits depend on your hosting (PHP memory, max execution time, file upload size). Files are processed in batches, so large imports work even on shared hosting — they just take longer.

= Can I re-import the same file to update records? =

Yes. By default, rows match against existing records by SKU (products), slug (posts/pages/CPTs), or URL (media). Matching rows update in place rather than creating duplicates.

= What about JSON files? =

The plugin reads JSON files in three shapes: a top-level array of objects, an object with one array property (e.g. `{"products": [...]}`), or NDJSON (one JSON object per line). The MIME-type sniffer in WordPress sometimes rejects JSON files; the plugin handles that automatically.

= Does it work with custom fields and ACF? =

Custom fields work via the `meta:fieldname` mapping syntax. Direct ACF field-type awareness (with proper coercion for repeaters, galleries, etc.) is not in this version.

= What if my import fails partway through? =

You'll see exactly which row caused the error in the logs panel, and the import can be resumed from where it stopped. Successful rows are not re-processed.

= Where do I get support? =

Use the WordPress.org support forum for this plugin, or visit https://simpleimporter.com.

== Screenshots ==

1. Content type picker — choose what you're importing
2. Drag-and-drop column mapping with live preview of how rows will land
3. Import progress with row-by-row logs

== Changelog ==

= 0.1.0 =
* Initial release.
* Simple product, post, page, custom post type, and media imports.
* CSV, XLSX, XML, and JSON source files.
* Drag-and-drop column mapping with auto-detection.
* Background processing via Action Scheduler.
* Yoast SEO field support (when Yoast is active).

== Upgrade Notice ==

= 0.1.0 =
Initial release.
