| @@ -47,12 +47,21 @@ | ||
| 47 | 47 | * price_id 1 = Personal (yearly) → Personal |
| 48 | 48 | * price_id 2 = Professional (yearly) → Professional |
| 49 | 49 | * price_id 3 = Agency (yearly) → Agency |
| 50 | 50 | * price_id 4 = Personal Lifetime → Personal |
| 51 | - * price_id 5 = Unlimited Lifetime → Personal | |
| 51 | + * price_id 5 = Unlimited Lifetime (LEGACY) → Personal | |
| 52 | + * price_id 6 = Professional Lifetime → Professional | |
| 53 | + * price_id 7 = Agency Lifetime → Agency | |
| 52 | 54 | * |
| 53 | - * Both lifetime SKUs are sold under the Personal plan tier — they only | |
| 54 | - * remove the renewal, they don't grant access to higher-tier addons. | |
| 55 | + * Lifetime SKUs (#4, #6, #7) grant the same tier rank as their yearly | |
| 56 | + * counterparts (#1, #2, #3) — they only remove the renewal, the feature | |
| 57 | + * set matches the equivalent yearly tier. | |
| 58 | + * | |
| 59 | + * #5 is the discontinued "Unlimited Lifetime" ($399, Personal-tier | |
| 60 | + * unlimited-sites SKU sold before the lifetime tier split). EDD no | |
| 61 | + * longer offers it, but legacy customers still carry price_id=5 on | |
| 62 | + * their license meta. Keep the Personal-tier mapping so they don't | |
| 63 | + * suddenly lose access on this upgrade. | |
| 55 | 64 | */ |
| 56 | 65 | private const PRICE_ID_MAP = [ |
| 57 | 66 | '1' => self::PLAN_PERSONAL, |
| 58 | 67 | '2' => self::PLAN_PROFESSIONAL, |
| @@ -58,8 +67,10 @@ | ||
| 58 | 67 | '2' => self::PLAN_PROFESSIONAL, |
| 59 | 68 | '3' => self::PLAN_AGENCY, |
| 60 | 69 | '4' => self::PLAN_PERSONAL, |
| 61 | 70 | '5' => self::PLAN_PERSONAL, |
| 71 | + '6' => self::PLAN_PROFESSIONAL, | |
| 72 | + '7' => self::PLAN_AGENCY, | |
| 62 | 73 | ]; |
| 63 | 74 | |
| 64 | 75 | /** |
| 65 | 76 | * Per-request memo for getCurrentPlan(). The full resolution chain hits |
| @@ -135,10 +146,17 @@ | ||
| 135 | 146 | // Fallback: scan item / product name for a tier keyword. |
| 136 | 147 | // Order matters — check the most specific terms first. The product |
| 137 | 148 | // name itself is "Easy Invoice Pro", so a bare "pro" substring match |
| 138 | 149 | // would mis-classify Personal/Agency licenses as Professional. |
| 139 | - // Both lifetime SKUs ("Personal Lifetime", "Unlimited Lifetime") are | |
| 140 | - // Personal-tier per the store catalog. | |
| 150 | + // | |
| 151 | + // Tier-by-SKU mapping (all matched on lowercased item_name): | |
| 152 | + // "Agency" / "Agency Lifetime" → Agency | |
| 153 | + // "Professional" / "Professional Lifetime" → Professional | |
| 154 | + // "Personal" / "Personal Lifetime" → Personal | |
| 155 | + // "Unlimited Lifetime" (legacy SKU) → Personal | |
| 156 | + // The "agency" and "professional" checks run before the | |
| 157 | + // personal/lifetime/unlimited check so the new tiered Lifetime | |
| 158 | + // SKUs land in the right tier rather than being lumped into Personal. | |
| 141 | 159 | $itemName = ''; |
| 142 | 160 | if (is_object($details)) { |
| 143 | 161 | $itemName = strtolower((string) ($details->item_name ?? $details->name ?? '')); |
| 144 | 162 | } |
| @@ -220,12 +238,12 @@ | ||
| 220 | 238 | |
| 221 | 239 | /** |
| 222 | 240 | * EDD price_id → variant label. Mirrors the SKU list in the store. |
| 223 | 241 | * |
| 224 | - * price_id 4 ("Personal Lifetime") and price_id 5 ("Unlimited Lifetime") | |
| 225 | - * both ship under the same "Personal Lifetime" plan label — the only | |
| 226 | - * difference between them is the activation/site count, which is shown | |
| 227 | - * separately on the License page as Activations: X / Y. | |
| 242 | + * price_id 5 is the discontinued "Unlimited Lifetime" SKU — labeled | |
| 243 | + * here as "Personal Lifetime" so legacy customers see the same row | |
| 244 | + * as buyers of the current Personal Lifetime (#4). The activation / | |
| 245 | + * site count differs and is shown separately on the License page. | |
| 228 | 246 | */ |
| 229 | 247 | private const PRICE_ID_VARIANT_LABELS = [ |
| 230 | 248 | '1' => 'Personal', |
| 231 | 249 | '2' => 'Professional', |
| @@ -231,8 +249,10 @@ | ||
| 231 | 249 | '2' => 'Professional', |
| 232 | 250 | '3' => 'Agency', |
| 233 | 251 | '4' => 'Personal Lifetime', |
| 234 | 252 | '5' => 'Personal Lifetime', |
| 253 | + '6' => 'Professional Lifetime', | |
| 254 | + '7' => 'Agency Lifetime', | |
| 235 | 255 | ]; |
| 236 | 256 | |
| 237 | 257 | /** |
| 238 | 258 | * Resolve a human-readable variant label for the current license. |