Fix for editing Classes and Schedule on the WC Schedule Plugin for WordPress
Due to a php code error in the Weekly Class Schedule Plugin the edit link for Classes seemed to be broken. When clicking “edit”, the plugin would redirect us to the WordPress login screen.
To fix this issue, we had to change one line of code in the file WcsApp.php
This file is located here: /wp-content/plugins/weekly-class-schedule/includes/WcsApp.php
At the very bottom of this php file you will find the following code:
public static function getBaseUrl()
$server = esc_url( $_SERVER[SERVER_NAME] );
$uri = esc_url( $_SERVER[REQUEST_URI] );
$url = $server . $uri;
All you have to do is change [SERVER_NAME] to [HTTP_HOST] and you’re ready to edit your classes!