Fatal error: Class ‘WC_Product’ not found

Home Forums Ticket Products Event Tickets Plus Fatal error: Class ‘WC_Product’ not found

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #1158176
    Maksem
    Participant

    Hi again,

    I set up a test event at $0.00, with 3 seats max.

    All goes well with the purchase and emails being sent. When I go back to the event page and click ‘view my tickets’
    I see this error at the bottom of the screen. Not quite sure how to fix this one?

    Fatal error: Class 'WC_Product' not found in /***/***/public_html/wp-content/themes/vendd-child/tribe-events/tickets-plus/orders-tickets.php on line 74

    Cheers

    #1158477
    Nico
    Member

    Hi there @Maksem,

    Thanks for getting in touch with us! I’ll help you here…

    The ‘WC_Product’ is a WooCommerce Class, Are you using WooCommerce as the e-commerce framework in your site? It would be great if you could share your system information with me so I can check your site setup.

    Also, Can you please follow the steps described in our Testing for conflicts guide? This way we can see if this is a problem in our plugin or a conflict with the theme or other installed plugins.

    Thanks,
    Nico

    #1158519
    Maksem
    Participant

    Hi,

    We’re using Easy Digital Downloads for our e-commerce setup.

    Yes, I’ve tested for plugin conflicts with no changes.

    Cheers

    #1158520
    Maksem
    Participant

    This reply is private.

    #1159099
    Maksem
    Participant

    Hello,

    The issue is this line from orders-tickets.php:

    $product = new WC_Product( $attendee['product_id'] );

    I think this line of code should be calling the product id from easy digital downloads instead of woocommerce, since I’m not using woocomerce. I’m just not sure what the right code replacement for ‘WC_Product’ should be – how to get the product id from EDD instead of WC?

    Hope this can assist you in helping me solve this.

    Thanks

    #1159145
    Maksem
    Participant

    Ok. I fixed it by simply commenting the line out.

    Cheers.

    #1159384
    Nico
    Member

    Hey,

    Thanks for following up, and sorry for the delay in my reply. I was out yesterday so I’m just reviewing this right now.

    Checking the original file in our plugin, I can see this and it’s of course not correct to assume the user is working with WooCommerce. I’ll log a bug ticket for this to get fixed.

    Thanks once again keeping me posted with your great findings 🙂

    I’ll go ahead and close out this thread, but if you need help with anything else please don’t hesitate to create a new one and we will be happy to assist you.

    Have a great weekend,
    Nico

    #1164166
    Geoff
    Member

    Hey there, just wanted to give you a heads up that we are in the process of releasing Event Tickets and Event Tickets Plus 4.2.7 and it will include a fix for this issue. Please keep your eyes open for the update either today or tomorrow and let us know if you continue to see issues after the update.

    Thanks so much for reporting this and for your patience while we worked on it!

    Cheers,
    Geoff

Viewing 8 posts - 1 through 8 (of 8 total)
  • The topic ‘Fatal error: Class ‘WC_Product’ not found’ is closed to new replies.