Title: doodoole's Replies | WordPress.org

---

# doodoole

  [  ](https://wordpress.org/support/users/doodoole/)

 *   [Profile](https://wordpress.org/support/users/doodoole/)
 *   [Topics Started](https://wordpress.org/support/users/doodoole/topics/)
 *   [Replies Created](https://wordpress.org/support/users/doodoole/replies/)
 *   [Reviews Written](https://wordpress.org/support/users/doodoole/reviews/)
 *   [Topics Replied To](https://wordpress.org/support/users/doodoole/replied-to/)
 *   [Engagements](https://wordpress.org/support/users/doodoole/engagements/)
 *   [Favorites](https://wordpress.org/support/users/doodoole/favorites/)

 Search replies:

## Forum Replies Created

Viewing 4 replies - 1 through 4 (of 4 total)

 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Event Tickets and Registration] tribe_tickets_buy_button() in custom template takes forever](https://wordpress.org/support/topic/tribe_tickets_buy_button-in-custom-template-takes-forever/)
 *  Thread Starter [doodoole](https://wordpress.org/support/users/doodoole/)
 * (@doodoole)
 * [3 years, 5 months ago](https://wordpress.org/support/topic/tribe_tickets_buy_button-in-custom-template-takes-forever/#post-16272742)
 * Nope, it does not work, for some sold out events it returns nil, but for some
   it does not.
 * But, I wrote my function, which gets number of sold tickets and compares it with`
   tribe_get_event_capacity()`
 * Thanks
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Event Tickets and Registration] tribe_tickets_buy_button() in custom template takes forever](https://wordpress.org/support/topic/tribe_tickets_buy_button-in-custom-template-takes-forever/)
 *  Thread Starter [doodoole](https://wordpress.org/support/users/doodoole/)
 * (@doodoole)
 * [3 years, 5 months ago](https://wordpress.org/support/topic/tribe_tickets_buy_button-in-custom-template-takes-forever/#post-16270821)
 * HI [@abzlevelup](https://wordpress.org/support/users/abzlevelup/)
 * It looks like the problem is with too many orders, on the original site, there
   are about 800000 entries in wp_postmeta, but, I might have come up with a solution…
   Correct me if I’m wrong, when there are no more tickets, the `tribe_get_cost()`
   returns `nul`? I made an if/then clause to check if it is `nul`, if it is, it
   hides the button for ordering tickets, and if it is not, it shows the price and
   the button for ordering tickets.
 * Thanks
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Event Tickets and Registration] tribe_tickets_buy_button() in custom template takes forever](https://wordpress.org/support/topic/tribe_tickets_buy_button-in-custom-template-takes-forever/)
 *  Thread Starter [doodoole](https://wordpress.org/support/users/doodoole/)
 * (@doodoole)
 * [3 years, 5 months ago](https://wordpress.org/support/topic/tribe_tickets_buy_button-in-custom-template-takes-forever/#post-16239905)
 * Hi [@abzlevelup](https://wordpress.org/support/users/abzlevelup/)
 * thanks for fast reply
 * I now get `Parse error: syntax error, unexpected token "return"`
 * when I try to open the page
 * The page is loading slow, customized or out of the box template, now when I look
   at it, might have something to do with having to check through woocommerce for
   tickets quantity. I deleted all the orders in woocommerce, and it loads in about
   3-6 seconds. Not really the thing I would like to do from time to time, but might
   be the solution.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Event Tickets and Registration] tribe_tickets_buy_button() in custom template takes forever](https://wordpress.org/support/topic/tribe_tickets_buy_button-in-custom-template-takes-forever/)
 *  Thread Starter [doodoole](https://wordpress.org/support/users/doodoole/)
 * (@doodoole)
 * [3 years, 5 months ago](https://wordpress.org/support/topic/tribe_tickets_buy_button-in-custom-template-takes-forever/#post-16235104)
 * Hi,
 * this is the URL to [custom page](https://nukketeatterisampo.fi/esityskalenteri/)
 * and this is the link to [default page](https://nukketeatterisampo.fi/esityskalenteri1/)
   without customization.
 * Both are opening very slow…

Viewing 4 replies - 1 through 4 (of 4 total)