How to add service providers on [app_confirmation]

Hi,
How do I get service providers to show up on [app_confirmation]?

It will allow the client to make sure they selected the right service providers before they confirm their appointment.

It only shows the service, date, duration and price.

Thanks!

  • Hakan
    • The Incredible Smush

    Hi,

    You are right Mason, this is not included as default since service provider selection is optional. It is possible to add fields there using filter hooks, but it will be placed as the last line of the form.

    I will think about a better solution, but at the moment I think you can use the below workaround.

    Add these codes in functions.php of your current theme:

    function add_service_provider( $ret ) {
    	global $appointments;
    	$a = $appointments;
    	if ( !is_object($a) ) return $ret;
    	if ( $a->worker ) {
    		$r = '<div><label><span>Service provider:</span>'. $a->get_worker_name($a->worker) . '</label></div>';
    		return $ret. $r;
    	}
    	return $ret;
    }
    add_filter( 'app_additional_fields', 'add_service_provider' );

    Note: Provider line will only be displayed if one is selected, that is, not "no preference".

    Cheers,
    Hakan

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.