Plugin not registering on GoToWebinar when adding an order manually via WooCommerce backend

May 2, 2018 12:59 pm

Plugin not registering on GoToWebinar when adding an order manually via WooCommerce backend. Sometimes users may need to call to pay for a webinar or if there’s an error for some reason we need to manually add an order to give them access to their webinar. However when creating an order manually via the backend, it doesn’t register them on GoToWebinar.

Published by 2 Comments

2 Replies

  • Hello – please check 3.0.5 which we just published today. When you create a manual order, save it as “pending payment”, then change status to “completed” and update again. Thanks and please let us know if you have any questions.

    • Thank you @gotowp. I’m attempting to trigger this registration feature via AJAX and a “wp_ajax” php function… I’ve got the function firing just fine from a button click, but I’m curious on what is wrong with the following code:

      $order_id = intval( $_POST[‘order_id’] );
      $order = new WC_Order($order_id);
      $order->update_status(‘pending’, $note = ‘manually updating to pending via code’,true);
      $order->update_status(‘completed’, $note = ‘manually updating to completed via code’,true);
      echo $order_id.” is complete!”;

      I only need to understand why the “$order->update_status” (lines 3 and 4).isn’t working. It is in the sense that it updates the order status properly, but when it updates it, the same functionality you described above doesn’t work. Now, when changing the order status manually via the Dashboard (not via code, but human-clicking), GoToWebinar gets notified of a new registration. Why would the programmatic change act any differently? Would there be another piece of code I’d put into place to accomplish the same thing?

Leave a Reply

Your email address will not be published.