We want to add a new parameter in dashboard_url as we did in Rocket Insights rocket_insights_upgrade.
Based on the new rocketcdn parameter
- The plugin will (clear a transient) refetch user data from
/stat/1.0/wp-rocket/user.php, and it will return
cdn_token, cdn_url and rocketcdn_website_id
- Do the necessary configuration of RocketCDN on the customer's website
wp_ajax_rocketcdn_validate_token_cname (AI plugin uses this action)
- Call the rocketCDN API to activate
PATCH /api/website/{rocketcdn_website_id}/ with:
$data = [
'is_active' => $is_active,// true or false
];