wp-media / wp-rocket

Performance optimization plugin for WordPress
https://wp-rocket.me
GNU General Public License v2.0
702 stars 219 forks source link

Display accurate licence name, not depending on licence account #7096

Closed nicomollet closed 1 week ago

nicomollet commented 2 weeks ago

Is your feature request related to a problem? Please describe.

Related to service issue: https://github.com/wp-media/wp-rocket.me/issues/4255

The plugin currently hardcodes licence name in the dashboard view. It considers the licence_account integer to display Single, Plus or Infinite.

A future update will add new fields to the user endpoint to get the actual name of the license, avoiding having to calculate the licence matching the number of websites. Goal is to make is dynamic.

The PR only changes dashboard view (Your licence) with a fallback:

This is supposed to be a quick change to fix our main issue with new type of licences.

Other work is done in parallel to tackle other features that need to be more dynamic like upgrades, renewals, prices.

Describe the solution you'd like Get the (new) license name value from the user endpoint. Display it in the dashboard. Fallback if not defined.

Incoming PR to be submitted by @wp-media/engineering-service-team

FYI @piotrbak

ETA: before Black Friday / Nov. 19th

nicomollet commented 2 weeks ago

How to change a licence from a customer: Change the (Rocket) Account field to one of the values matching the new licences: 10, 50, 100, 500.

If I change it to 50 Image

It will update licence>name to Multi50.

nicomollet commented 1 week ago

So the QA was done by @Mai-Saad and the service team has already released the new licence properties on production.

It now only depends on Plugin to to be released.