Ticket price depending on user's role

WordPress Event Management, Calendars & Registration Forums Pre Sales Questions Ticket price depending on user's role

This topic contains 1 reply, has 2 voices, and was last updated by  Stephen Harris 1 week, 3 days ago.

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

    Hello!

    I’m interested on this plugin and its Pro features, everything it has is all what I need except for one feature which is essential to me: price depending on the user’s role. This is because on my site there are users which pay a monthly subscription to be assign a certain role (gold member), and those users must have a discount in the event’s tickets.

    I hope this feature already exists, so the Pro add-on will be just perfect for me!

    Regards.

    Daniel Garcia
    #35947 Reply

    Hi Daniel,

    This isn’t a feature of the plug-in unfortunately. You could probably achieve this by using a discount code, and using the eventorganiser_is_discount_code_valid filter to ensure the code is only valid when used by someone with a certain role. E.g.

    add_filter('eventorganiser_is_discount_code_valid', function($is_valid, $discount, $booking_id) {
        $user_id = (int) eo_get_booking_meta( $booking_id, 'bookee' );
        if (!$user_id) {
            return false;
        }
        $user_data = get_userdata( $user_id );
    
        //change 'gold member' to whichever role name you require
        return $is_valid && in_array( 'gold member', $user_data->roles );
    
    }, 10, 3);
    
    Stephen Harris
Viewing 2 posts - 1 through 2 (of 2 total)
Reply To: Ticket price depending on user's role
Your information:




To create code blocks or other preformatted text, indent by four spaces:

    This will be displayed in a monospaced font. The first four 
    spaces will be stripped off, but all other whitespace
    will be preserved.
    
    Markdown is turned off in code blocks:
     [This is not a link](http://example.com)

To create not a block, but an inline code span, use backticks:

Here is some inline `code`.

For more help see http://daringfireball.net/projects/markdown/syntax


<a href="" title="" rel=""> <blockquote cite=""> <code> <pre> <em> <strong> <del datetime=""> <ul> <ol start=""> <li> <img src="" border="" alt="" height="" width=""> <p style=""> <span style="">