• Resolved webfactoria

    (@webfactoria)


    Hello,

    Can we integrate the plugin with Woocommerce?
    What we want is that after a client purchases a product (course) they get access to take the exam.
    Can this be done with the HD Quiz plugin?
    Thanks

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Harmonic Design

    (@harmonic_design)

    Hi there,
    this is not something that should be done in HD Quiz; this should be done on WooCommerce’s side.

    The best way would be to create a hidden page with the quiz. Then you can edit the WooCommerce emails to include a link to the quiz.

    You might want to also add a WooCommerce hook that fires off once an order has been confirmed. The best hook is probably the woocommerce_payment_complete hook. It would look something like this:

    
    function webfactoria_payment_complete( $order_id ){
        $order = wc_get_order( $order_id );
        // check the order to see if the order contains a course
        // if the order contains a course, then you can do several things
        // including redirecting to the quiz, or sending a custom follup email with a link
    }
    add_action( 'woocommerce_payment_complete', 'webfactoria_payment_complete' );
    Thread Starter webfactoria

    (@webfactoria)

    Thank you for replying.
    We found out a similar solution and we are planning to go down that road.
    If it’s okay, I have another question about the plugin itself.

    Can this plugin be used as a Online Exam tool? Therefore how scoring works? Can we have a maximum number of wrong questions so the user fails when they hit that number?
    Or what about just a percentage of correct answers?

    Plugin Author Harmonic Design

    (@harmonic_design)

    Results (Pass or Fail) can be set on a per quiz basis and is based on percentage. So each quiz can have a unique pass percentage – eg: Quiz A needs 70% while quiz B only needs 50%.

    Just note that other than the free addon Save Results Light, HD Quiz does not store or save the results of quizzes in anyway. But if your users will be logged in before taking the quiz, then the Save Results Light addon will certainly get you most of the way.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Woocommerce integration’ is closed to new replies.