Forum Replies Created

Viewing 5 replies - 1 through 5 (of 5 total)
  • Thread Starter jzimmer

    (@jzimmer)

    Same bug just tested with EM 5.6.3 and EMpro 2.4.4, WordPress 4.5

    Thread Starter jzimmer

    (@jzimmer)

    We just updated to 5.6.2 and 2.4.3 so we don’t plan to do any update in close future.
    And right now I don’t have the time to set up a new sandbox to test on newer version. Also I don’t read anything about this in the release notes. So I assume the bug will be in 5.6.3 also.

    But you guys may check. It’s easy to reproduce if you have a system with latest version available.

    Thread Starter jzimmer

    (@jzimmer)

    Here is my solution:

    functions.php

    function requiredTicketUnavailable($EM_Event) {
    	$unavailable = false;
    	foreach($EM_Event->get_bookings()->get_tickets()->tickets as $EM_Ticket){
    		if ($EM_Ticket->ticket_required) {
    			if (!$EM_Ticket->is_available()) {
    				$unavailable = true;
    			}
    		}
    	}
    	return $unavailable;
    }
    function filterEventOutputCondition($replacement, $condition, $match, $EM_Event){
        if (is_object($EM_Event)) {
    
            switch ($condition) {
                case 'all_required_tickets_available':
                    if (!requiredTicketUnavailable($EM_Event))
                        $replacement = preg_replace('/\{\/?all_required_tickets_available\}/', '', $match);
                    else
                        $replacement = '';
                    break;
    
    			case 'required_ticket_unavailable':
                    if (requiredTicketUnavailable($EM_Event))
                        $replacement = preg_replace('/\{\/?required_ticket_unavailable\}/', '', $match);
                    else
                        $replacement = '';
                    break;	
    
            }
        }
        return $replacement;
    }
    
    add_filter('em_event_output_condition', 'filterEventOutputCondition', 10, 4);

    In the event markup in events managers settings I can then use {required_ticket_unavailable}Code{/required_ticket_unavailable} and
    {all_required_tickets_available}Code{/all_required_tickets_available}. Works fine.

    Thread Starter jzimmer

    (@jzimmer)

    Hi,

    thank you. By now I found out, that there are privacy issues with google maps in general. Google allows the usage of its google maps services for free, as long as it is used confirming to the API without custom modifications.

    The reason is that google collects the information of the users that browse google maps and all pages that use google maps plugins. No matter if you currently are logged in to a google account or of you’re an anonymous user that is just identified by IP, OS, Browser, etc. – google collects information about the sites with google maps plugins and other google services you browse and the places that are shown on these maps.
    This information is used to “improve your user experience”. In fact it is used to improve the effectiveness of ads you will see on other pages.

    So yes – embedding a google maps plugin on any webpage will help google collect information that are used to personalize ads. Your wordpress plugin is no exception.

    That’s not a problem in general because it is the way the users ‘pay’ for being able to use the free map service. But it’s good to know that this is happening.

    (Measurements to prevent a maps plugin from collecting this information are a violation of googles terms of service.
    https://developers.google.com/maps/terms )

    Thread Starter jzimmer

    (@jzimmer)

    Thanks angelo,
    so to correctly understand you suggest adding a custom placeholder like {all_required_tickets_bookable} and add this one to my booking form template?

    Not the prettiest solution but sounds reasonable to me and should work. Thanks for that idea.

    Still open to alternative solutions.

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