=== Same Square – Editable Scan Codes ===
Contributors: stettzy
Tags: qr code, qr code generator, dynamic qr code, scan tracking, marketing
Requires at least: 6.4
Tested up to: 7.1
Requires PHP: 7.4
Stable tag: 1.0.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Change the link. Keep the square. Create editable QR codes, printable cards, and privacy-friendly scan analytics directly in WordPress.

== Description ==

Same Square creates QR codes that can keep working after the destination changes. Each code points to a permanent URL on your WordPress site, so you can update the link later without replacing printed signs, menus, cards, or labels.

Everything runs on your WordPress site. The plugin does not send QR content or scan data to an outside service.

= Features =

* Create unlimited QR codes with your own destination URLs.
* Change a destination without changing the printed QR code.
* Download print-ready PNG or scalable SVG files.
* Design printable QR cards with reusable layouts, custom text, a logo, colors, paper sizes, and portrait or landscape orientation.
* Choose foreground and background colors.
* Schedule when a code starts working or expires.
* View all-time, today, 7-day, and 30-day scan metrics, a daily trend, last scan date, and performance for each QR code.
* Track aggregate scans without storing IP addresses, device details, user agents, referrers, or individual visit records.
* Place codes with the Same Square block or `[same_square_qr]` shortcode.
* Use friendly scan URLs with pretty permalinks and an automatic query-string fallback.

= Useful for =

Restaurant menus, review links, event information, product instructions, property listings, downloadable files, payment pages, contact pages, and marketing materials.

= Privacy =

Same Square stores one aggregate count per QR code per day. It does not store an IP address, browser, device, referrer, location, or a record for each visitor. A visitor's browser still connects to your WordPress site and then to the destination you configure; those systems may have their own logging and privacy policies.

= Important =

Dynamic QR codes depend on your WordPress site and domain remaining available. If the site, plugin, or domain stops working, its scan URLs stop redirecting. Test every printed code with a phone before distributing it, and keep a backup of your site.

QR Code is a registered trademark of DENSO WAVE INCORPORATED.

= Development and source code =

Same Square ships its PHP, JavaScript, and CSS as human-readable, unminified source. No build step is required to review or modify the distributed plugin. The print-card layout is maintained in `assets/css/print-card.css`, and the corresponding behavior is in `assets/js/frontend.js`.

QR rendering uses the bundled, human-readable QR Code Generator for JavaScript by Kazuhiko Arase. Its maintained source is available at https://github.com/kazuhikoarase/qrcode-generator and its MIT license is included with the plugin.

== Installation ==

1. Upload the plugin ZIP through Plugins > Add New > Upload Plugin, or copy the plugin folder to `/wp-content/plugins/`.
2. Activate Same Square – Editable Scan Codes.
3. Open Same Square > Add New.
4. Name the code, enter a complete destination URL, and publish it.
5. Download the PNG or SVG, print a card, or add the Same Square QR Code block to a page.

== Frequently Asked Questions ==

= Is the QR code dynamic? =

Yes. The image contains a permanent URL on your WordPress site. You can edit the final destination later while keeping the same QR image.

= Does scan tracking identify visitors? =

No. Same Square increments a daily aggregate number. It does not store IP addresses, browser details, device details, referrers, or location data.

= Where can I see scan metrics? =

Open Same Square > Analytics for site-wide totals, a 30-day trend, and a performance table for every QR code. Each QR code editor also includes its own analytics panel with all-time, today, 7-day, and 30-day totals plus the last scan date.

= Can I customize the printable card? =

Yes. The Print Card Designer includes poster, minimal, and table-card layouts. You can edit the heading and description, add a logo, choose card colors and visibility options, and print on A4, A5, US Letter, or 4 × 6 inch paper in portrait or landscape orientation.

= Does this plugin use an external QR service? =

No. QR images are generated in the visitor's browser using a bundled open-source library. Redirects and aggregate counts are handled by your WordPress site.

= What happens if I change my WordPress domain? =

Previously printed codes contain the old domain. Keep the old domain redirecting to the new one, or print new codes after a domain change.

= Will page caching affect redirects or scan totals? =

Same Square sends no-cache headers and defines `DONOTCACHEPAGE` for scan requests. Some server or CDN configurations may still cache redirects. Exclude `/same-square/` from caching if your host or CDN overrides WordPress headers.

= How do I use the shortcode? =

Use `[same_square_qr id="123"]`, replacing `123` with the QR code ID. Optional attributes are `size` (96 to 1024 pixels) and `label` (`true` or `false`). Example: `[same_square_qr id="123" size="320" label="true"]`.

= Can I link directly to a file or another website? =

Yes. Any complete `http://` or `https://` URL can be used. Only redirect to destinations you trust and are authorized to promote.

== Screenshots ==

1. Create a dynamic QR code, choose colors, and set an optional schedule.
2. Customize and print a branded QR card or download a PNG or SVG.
3. View privacy-friendly totals, daily trends, last scans, and per-code performance on the Analytics screen.
4. Review one code's scan metrics directly in its editor.
5. Add an existing code with the Same Square QR Code block.

== Changelog ==

= 1.0.0 =

* Initial release.
* Added dynamic QR codes with editable destinations.
* Added PNG/SVG downloads and a customizable print card designer.
* Added scheduling, a privacy-friendly scan analytics dashboard, per-code metrics, a block, and a shortcode.

== Upgrade Notice ==

= 1.0.0 =

Initial release.
