-
Notifications
You must be signed in to change notification settings - Fork 223
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Renewal banner with discount percentage instead of difference #6349
Comments
Scope a solution ✅In
|
Looks okay to me |
Additional context about the pricing update:
Current pricing endpoint JSON data:{
"licenses":{
"single":{
"prices":{
"regular":59,
"sale":41.3,
"renewal":{
"is_grandfather":39.2,
"is_grandmother":49,
"not_grandfather":59,
"is_expired":59
}
},
"websites":1
},
"plus":{
"prices":{
"regular":119,
"sale":83.30000000000001,
"from_single":{
"regular":60,
"sale":42
},
"renewal":{
"is_grandfather":79.2,
"is_grandmother":99,
"not_grandfather":119,
"is_expired":119
}
},
"websites":3
},
"infinite":{
"prices":{
"regular":299,
"sale":209.3,
"from_single":{
"regular":240,
"sale":168
},
"from_plus":{
"regular":180,
"sale":126
},
"renewal":{
"is_grandfather":199.2,
"is_grandmother":249,
"not_grandfather":299,
"is_expired":299
}
},
"websites":"unlimited"
}
},
"renewals":{
"extra_days":15,
"grandfather_date":1640995200,
"grandmother_date":1672389000,
"discount_percent":{
"is_grandfather":20,
"not_grandfather":0,
"is_expired":0
}
},
"promo":{
"name":"Black Friday",
"discount_percent":30,
"start_date":1700438400,
"end_date":1701302399
}
} Pricing endpoint after January 26th pricing update:{
"licenses":{
"single":{
"prices":{
"regular":59,
"sale":41.3,
"renewal":{
"is_grandfather":47.2,
"is_grandmother":59,
"not_grandfather":59,
"is_expired":59
}
},
"websites":1
},
"plus":{
"prices":{
"regular":119,
"sale":83.30000000000001,
"from_single":{
"regular":60,
"sale":42
},
"renewal":{
"is_grandfather":95.2,
"is_grandmother":119,
"not_grandfather":119,
"is_expired":119
}
},
"websites":3
},
"infinite":{
"prices":{
"regular":299,
"sale":209.3,
"from_single":{
"regular":240,
"sale":168
},
"from_plus":{
"regular":180,
"sale":126
},
"renewal":{
"is_grandfather":239.2,
"is_grandmother":299,
"not_grandfather":299,
"is_expired":299
}
},
"websites":"unlimited"
}
},
"renewals":{
"extra_days":15,
"grandfather_date":1640995200,
"grandmother_date":315532800,
"discount_percent":{
"is_grandfather":20,
"not_grandfather":0,
"is_expired":0
}
},
"promo":{
"name":"Black Friday",
"discount_percent":30,
"start_date":1700438400,
"end_date":1701302399
}
} Discount as a percentBeware the We don't need to do this anymore: We can simply take the renewal percent from the JSON: available as if ( $renewals['is_grandfather'] ) {
return $renewals['discount_percent']->is_grandfather;
} Grandmother statusThis status will be disabled. So the code base of the plugin can probably remove grand mother status now or later. FYI @piotrbak |
If that can help, you can preview the pricing endpoint with this URL (it behaves like if it was January 26th): |
For testing purposes: now that the pricing update is live on production (since today), no need to change the pricing endpoint URL. |
In the renewal banner, we need to display the discount as percentage, not in difference value.
Current text is:
Renew with a $xx discount
We need to make it like:
Renew with a x% discount
This can only be done after this other task is done:
The text was updated successfully, but these errors were encountered: