=== Yuva Testing Utilities ===
Contributors: theyuvarajs
Tags: testing, utilities, developer tools, toolkit, woocommerce
Requires at least: 6.2
Tested up to: 6.9.4
Requires PHP: 7.4
Stable tag: 1.2.3
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

A collection of developer utilities for faster WordPress and WooCommerce testing on local or staging environments.

== Description ==

Yuva Testing Utilities is built for developers and testers who want quick, lightweight tools inside the WordPress admin to speed up common testing tasks.

It's best used in **local** or **staging** setups where you frequently test emails, downloads, or dummy checkout flows — without repeatedly setting everything up from scratch.

The plugin keeps things simple: no bloat, no complicated setup, and focused utilities meant to save time.

**Modules included:**

* **Emails** — Configure SMTP, log all outgoing emails, preview them in the admin, and send test emails.
* **Auto-Fill** — Fill the WooCommerce checkout with a different random user on every click. Supports classic checkout and Checkout Blocks.
* **Downloader** — Download any installed plugin or theme as a .zip file, or grab the official WooCommerce sample products CSV.
* **Cleanup** — Batch-delete custom post type records, search and edit database options, and manage post meta rows.
* **Developer Tools** — Manage transients, view and trigger scheduled cron jobs, tail WooCommerce/WordPress log files, and generate bulk test users.

== Installation ==

1. Upload the plugin folder to `/wp-content/plugins/yuva-testing-utilities/`
2. Activate the plugin from **Plugins → Installed Plugins**
3. Open **Tools → Testing Utilities** to access the modules

== Frequently Asked Questions ==

= Is this plugin meant for production? =

It can run on production, but it is primarily designed for **development and staging** environments.

= What happens to temporary files created during downloads? =

Temporary files are cleaned up automatically after each download.

= Does this plugin send any data externally? =

Only the **Auto-Fill** module makes an external request to RandomUser.me to fetch sample placeholder user data. No personal, user, or site data is ever sent to the API.

= Why does the plugin require WordPress 6.2? =

The plugin uses the `%i` (identifier) placeholder introduced in `$wpdb->prepare()` in WordPress 6.2 to safely parameterise table and column names in database queries.

== Screenshots ==

1. Modules dashboard
2. Emails — log table with preview modal
3. Developer Tools — transients manager

== Changelog ==

= 1.2.3 =
* Added Downloader module: download plugins, themes, and WooCommerce sample data.
* Added Developer Tools module: transients, cron viewer, log viewer, user generator.
* Added SMTP migration for legacy flat option keys.
* Email preview now strips @media screen blocks to prevent CSS leaking into the admin.
* Requires at least WordPress 6.2 (uses %i placeholder in wpdb::prepare).

= 1.2.0 =
* Added email logging.

= 1.1.0 =
* Added cleanup tools.
* UI improvements.
* Moved Testing Utilities menu under Tools.

= 1.0.0 =
* Initial release.

== Upgrade Notice ==

= 1.2.3 =
Adds Downloader and Developer Tools modules. If you used SMTP settings in a previous version, they will be migrated automatically on activation.

= 1.2.0 =
Added email log. Safe to update.

== External services ==

This plugin connects to the following external services:

* **RandomUser.me** (`https://randomuser.me/api/`) — used only by the Auto-Fill module to generate random placeholder user data for testing checkout forms. No personal or site data is sent.
* **GitHub / WooCommerce repository** (`https://raw.githubusercontent.com/woocommerce/woocommerce/`) — used only by the Downloader module to fetch the official WooCommerce sample products CSV file on demand.
