Skip to content

Product uid support: setProductUid, storage clone, delete cascade (1.5.0) - #23

Merged
shazzad merged 8 commits into
mainfrom
feature/product-uid
Aug 8, 2026
Merged

shazzad merged 8 commits into
mainfrom
feature/product-uid

Conversation

@shazzad

@shazzad shazzad commented Aug 8, 2026

Copy link
Copy Markdown
Owner

Summary

  • setProductUid( 'prod_…' ) fluent setter — opaque product uid used for API URLs and license storage keys when set; numeric product_id stays in place and behavior is byte-identical when the uid is not set
  • One-time clone of id-based license options (_code/_data) to uid-based keys, triggered inside setProductUid(); old copies retained until the 1.6 prune release
  • delete_license_code() / delete_license_data() cascade to the id-based copy when a uid is set, so a removed license cannot be resurrected by the clone
  • CHANGELOG 1.5.0 entry + README "Product uid" section documenting the method_exists() consumer guard (required: the oldest bundled copy wins the class_exists race — reproduced live during the docker smoke)

Spec: docs/superpowers/specs/2026-08-08-product-uid-migration-design.md

Test plan

  • composer test: 85/85 (149 assertions), 15 new tests across uid keys, Client URLs, migration guards, delete cascade
  • Real-WordPress smoke in the w4dev docker container: clone + cascade verified against live options API
  • Existing suite untouched — backward-compat guarantee in test form

Follow-ups (not this PR)

  • Consumer rollouts (LoxoWP, Soccer Engine, WP Pro Admin, PimiPay, PimiDocs, updater-test): library bump + guarded setProductUid() per plugin
  • 1.6.0 prune release once all consumers carry the uid
  • Noted in review: trim() hardening in the setter, test for empty/double setProductUid, stale-legacy-copy caveat for the 1.6 notes

🤖 Generated with Claude Code

https://claude.ai/code/session_01QLTkSxiu6zN6hyAdnmfyKX

shazzad and others added 8 commits August 8, 2026 22:44
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
The uid is globally unique, and dropping the folder-derived slug means
license storage survives plugin folder renames.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QLTkSxiu6zN6hyAdnmfyKX
…namespace

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@shazzad
shazzad merged commit 5cc8b05 into main Aug 8, 2026
1 check passed
@shazzad
shazzad deleted the feature/product-uid branch August 8, 2026 20:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant