コンテンツにスキップ

Store-Main Integration Plan

Goal Description

Establish a data sharing mechanism between the "Store" (purchase site) and "Main" (support/docs/license site). Implement a Support Forum on the Main site that integrates purchase information to display user statuses (e.g., "Cross Poster Pro" user).

User Review Required

  • Architecture Confirmation: Are "Main" and "Store" the same WordPress instance or separate?
    • Assumption: They might be separate, requiring an API or shared database user table?
    • User Input Needed: Clarify if they are separate domains.
  • Badge Logic: cross-poster-pro=1 logic.
    • Default: ON.
    • User Toggle: ON/OFF.

Proposed Architecture

Data Sharing

  • Mechanism: API or Shared Database (TBD based on architecture).
  • Data Points:
    • Purchase History (Product IDs).
    • License Status (Active/Expired).
    • Personal Info (Name, Email - for account syncing).

Support Forum (Main Site)

  • Access Control:
    • Open registration.
    • Specialized access for Pro users (Priority Support section?).
  • Profile Badges:
    • Logic: Check user's license data.
    • Tags: [Cross Poster Pro], [Priority Support].
    • User Settings: Checkbox in profile to "Show Pro Status". Default: Checked.

Component Changes

software-license-manager (Main Site)

  • Profile Management: Extend user profile fields.
  • Integration Layer: Service to fetch/verify "Store" data.

Store Site (External?)

  • Webhooks/API: Provide user data to Main site on purchase.

Verification

  • User Flow:
    1. Buy Plugin on Store.
    2. Register/Login on Main (Support).
    3. Check Profile -> Badge appears automatically.
    4. Toggle Badge -> Badge disappears.