Team I currently have 2 services - Location Photoshoot

Hello Team
I currently have 2 services - Location Photoshoot and Pre-Shoot Consultation.
For the former, the location that we will meet is always the location discussed and agreed to. For that service, I like the Google Calendar Location field to state "Location Specified".
For the latter, the "location" is always either a Skype or Phone Call, hence for the Google Calendar Location field, I like it to state "Skype/Phone Call".
How do I configure it to behave that way?

  • Jose

    Hey there @Willliam,

    Hope you are doing great.

    This is totally doable if you are willing to add custom code to the plugin core.

    For a hookable customization, the short answer woould be 'no'. But there are still some things that you can try:

    For the confirmation form gcal redirect, it is easy. There is a filter than you can use and change the value of $param['location'] on the fly:
    apply_filters( 'app_gcal_variables', $param, $service, $start, $end )

    Unfortunately, there are no hooks availeble to achieve the same for the gcal API integration routine. You can see the code in here:

    wp-content/plugins/appointments/includes/class.gcal.php line 980:

    if ( isset( $this->options["gcal_location"] ) && '' != trim( $this->options["gcal_location"] ) )
    			$location = str_replace( array('ADDRESS', 'CITY'), array($app->address, $app->city), $this->options["gcal_location"] );
    $location = get_bloginfo( 'description' );

    It will use the text that you set under Google Calendar settings tab, replacing the tokens 'ADDRESS' and 'CITY' with dynamic values.

    You will need to change this block of code to grab your custom locations and inject it in the gcal event objecct.

    Hope this helps.

    Let me know if you have further questions.


Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.