Different closing time for pickup and delivery

WPPizza – A WordPress Plugin Support Feature Requests Different closing time for pickup and delivery

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #34933

    Jay
    Participant

    Example for a business open until 9PM

    Orders for delivery cut off at 8PM

    Orders for pickup cut off at 9PM

    #34975

    Olly
    Admin & Mod

    already doable with these filters / functions

    https://docs.wp-pizza.com/developers/?section=filter-wppizza_filter_options
    https://docs.wp-pizza.com/developers/?section=global-wppizza-functions
    i.e somethimg along these lines

    
    add_filter('wppizza_filter_options', 'my_prefix_my_options');
    function my_prefix_my_options($wppizza_options){
    
    /* 
    	on pickup , set your other closing times as you wish, 
    	below closes shop everyday at 9PM 
    	except on sunday where it will close at 8:30
    */
    if(wppizza_is_pickup()){
    	$wppizza_options['openingtimes']['opening_times_standard'][0]['close'] = '20:30';//sun
    	$wppizza_options['openingtimes']['opening_times_standard'][1]['close'] = '21:00';//mon
    	$wppizza_options['openingtimes']['opening_times_standard'][2]['close'] = '21:00';//tue
    	$wppizza_options['openingtimes']['opening_times_standard'][3]['close'] = '21:00';//wed
    	$wppizza_options['openingtimes']['opening_times_standard'][4]['close'] = '21:00';//thu
    	$wppizza_options['openingtimes']['opening_times_standard'][5]['close'] = '21:00';//fri
    	$wppizza_options['openingtimes']['opening_times_standard'][6]['close'] = '21:00';//sat
    }	
    
    return $wppizza_options;
    }
    

    not tested as such but should work

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.