So I set up a store for the company I work for. People pay, but it doesn't get shipped to them, because I'll bulk order the items and have them sent to the company and then they'll come see me (at work) to pick their items up.
So what I want to do it have a tablet when they come to pick it up where they put in their phone # to search for their order and then mark it complete. I found a plugin that does most of that (Woocommerce Order Search) so now I am trying to set up a button that they can just click to change their order status to complete.
I deleted the "Shipping Address" and put in the button, but with this code it makes the order completely disappear, not mark it as complete.
<td>
<form action="<?php add_action('woocommerce_order_status_completed') ?>" method="get">
<input type="hidden" value="http://www.store.bandwidthcorp.com/?page_id=13400">
<input type="submit" value="I Got It!">
</form></td>
Then I tried something like this:
<td>
<form action="<?php function order_complete {$order = new WC_Order($order_id); $order->update_status('completed'); }
add_action('order-complete') ?>" method="get">
<input type="hidden" value="http://www.store.bandwidthcorp.com/?page_id=13400">
<input type="submit" value="I Got It!">
</form></td>
But that didn't do anything at all. It seems like this should be pretty simple, but I can't seem to figure it out. Thanks in advance!