Description
When a RocketCDN subscription is active, we need to handle the CNAME change without overriding the CNAME option value if it already has one.
For example, a user who updates to 3.22 with a cname from a different CDN provider should not lose their details after they subscribe to RocketCDN free/paid.
Describe the solution you'd like
- I propose using
pre_get_rocket_option{$option_name} to change the cdn_cnames & cdn_zone
- Set the priority to < 10 so that one.com compatibility can take highest priority
- The callbacks will basically check for any form of RocketCDN Subscription and build the
cdn_cnames & cdn_zone from the transient stored by the user_client.
- These logic can be added here
- Then I believe we need to update these 2 methods enable & disable to avoid modifying the cdn options and preserve modification only through the UI for BYOCDN
Acceptance Criteria
- GIVEN that RocketCDN subscription is active(either free or paid)
- AND CDN DB options(
cdn_cnames & cdn_zone) are empty
- THEN
cdn_cnames & cdn_zone should change on a filter level and CDN DB options should remain empty.
- GIVEN that RocketCDN subscription is active(either free or paid)
- AND CDN DB options(
cdn_cnames & cdn_zone) are not empty
- THEN
cdn_cnames & cdn_zone should change on a filter level and CDN DB options values should remain as it is.
Dependency Module
N/A
Description
When a RocketCDN subscription is active, we need to handle the CNAME change without overriding the CNAME option value if it already has one.
For example, a user who updates to 3.22 with a cname from a different CDN provider should not lose their details after they subscribe to RocketCDN free/paid.
Describe the solution you'd like
pre_get_rocket_option{$option_name}to change thecdn_cnames&cdn_zonecdn_cnames&cdn_zonefrom the transient stored by the user_client.Acceptance Criteria
cdn_cnames&cdn_zone) are emptycdn_cnames&cdn_zoneshould change on a filter level and CDN DB options should remain empty.cdn_cnames& cdn_zone) are not emptycdn_cnames&cdn_zoneshould change on a filter level and CDN DB options values should remain as it is.Dependency Module
N/A