• Resolved eventaus

    (@eventaus)


    Hi,

    Is there a possiblity to allow logged in users to purchase their private tickets without making it public. Thank you

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Support wpemhelp

    (@wpemhelp)

    Hello,

    We’d like to inform you that only organizers can purchase private tickets. Logged in users will not be able to purchase private tickets.



    Regards,
    WP Event Manager.

    Thread Starter eventaus

    (@eventaus)

    Hi,

    When an orgaiser tries to purchase their private ticket when they are logged in because they can only see the ticket if the logged in, the get an error “Sorry, this product cannot be purchased.”

    Plugin Author Rita Kikani

    (@kikanirita)

    Hi @eventaus,

    If you are getting an error “Sorry, this product cannot be purchased.”, then you need to check the product price, it may possible that product price is not added in cart and because of that you are getting this error.

    Thank you.

    Thread Starter eventaus

    (@eventaus)

    .

    Thread Starter eventaus

    (@eventaus)

    Hi, The product works when the visbility is set to public, but when I private, I can add it to checkout and error occurs, This is for the logged organsier of the event with the private ticket. Any other reason why this is happening?

    Thread Starter eventaus

    (@eventaus)

    Hi Do you think this code will work:

    add_action( ‘woocommerce_is_purchasable’, ‘purchasable_fix’, 10, 2);
    function purchasable_fix($is_purchasable, $object) {
    $statuses = array(“publish”, “private”);
    return ($object->exists() && ( in_array($object->get_status(), $statuses) || current_user_can( ‘edit_post’, $object->get_id() ) ) && ” !== $object->get_price());
    }

    Plugin Author Rita Kikani

    (@kikanirita)

    Hi @eventaus,

    This is a woocommerce customization part, so I am not sure about above code, but I can guide you about to set product as private. As per my knowledge, you can not purchase any private product, so you must need to set it as a public first then only you can buy it. second, if you want to hide from normal users, then you need to set “Catalog visibility” as “Hidden” then you must need third party plugin to restrict the product to specific users or user roles. Plugins like WooCommerce Memberships or WooCommerce Private Store would be helpful to you.

    After that, you need to override template file called, “content-tickets-details.php” from sell ticket plugin and in that file you need to add condition based on restriction to view ticket which you set in woo products.

    I hope that this will help you to resolve your issue.

    Thank you.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Logged in organisers unable to purchase their Private tickets’ is closed to new replies.