By default you cannot import a .ics calendar from an external domain into your Wappointment Calendar.
It was considered unsafe by the WordPress’ team.
SO now when you try to setup our plugin with an external calendar you’ll get an error as follow:
From now on whenever you want to use an .ics file hosted somewhere else than a common provider. Step – 1 You’ll need to install this plugin here on your site and modify it so that the domain where your .ics file is hosted is cleared.
Step – 2 Once you’ve installed the plugin you’ll need to edit the index.php file of that plugin from the plugin File editor in Plugins > Plugin File Editor
Here it’s simple you just need to add your domain to the list available:
function wappointment_add_external_domains( $external_domains ) {
return array_merge($external_domains,[
'mydomain.com', // replace with your own domain
'mydomain2.com', // replace with your own domain
]);
}
add_filter('wappointment_allow_external_domains', 'wappointment_add_external_domains');
Step – 3 Let’s say I want to clear our domain wappointment.com the file will look like this after edition
function wappointment_add_external_domains( $external_domains ) {
return array_merge($external_domains,[
'wappointment.com', // replace with your own domain
]);
}
add_filter('wappointment_allow_external_domains', 'wappointment_add_external_domains');