Hi angelo,
However i can’t get any topic related to my need, as i said i need to update the spaces for an individual ticket into 0, so while update it it returns me the 10 spaces
i have tried
var $ticket_spaces = 0;
instead of
var $ticket_spaces = 10;
but it is not working at all,kindly address the problem
did you mean that by default it’s already set to 0 but when updating it revert back to 10?
Yes exactly,
i need to set 0 on anywhere else ???
Hiya,
0 is not a valid number of tickets – instead, you should set the “Total Spaces” setting for the event to the number of tickets that have been booked.
That way, no-one will be able to book a ticket for the event any more.
Thanks,
Phil
Hi philipjohn,
it doesn’t work to me because am doing the booking process manualy as i want, so am not using the default templates used in this plugin,
Thanks for your effort
maybe you can try this snippet
function my_spaces_function($EM_Ticket){
$EM_Ticket->ticket_spaces = 0;
}
add_action('em_ticket', 'my_spaces_function',10,1);
As for where to paste this : http://wp-events-plugin.com/tutorials/how-to-safely-add-php-code-to-wordpress/
Hi angelo_nwl,
Thanks for the answer.
However the given function doesn’t work as what i want, meaning that it always returns 0 if there is 100 or more ticket spaces,
i need to set 0 if there is no spaces available for the ticket type if i wish not always, else it remains with the current available spaces
Hope this will help you more to help
Sorry can you clarify what you mean by “am not using the default templates used in this plugin”
Are you overriding EM’s own templating somewhere?