• Resolved creatyfco

    (@creatyfco)


    hey there
    I have been using this plugin for a few months, and I freaking love it, very helpful

    but I have a little bit of a struggle when customers upload a receipt, I need to change the order status manually after I have approved the receipt.

    just wonder how to automatically change the order status to ‘on-hold’ after approving the receipt?

    ps: I need to change into ‘on-hold’ first because my processing email is only sent when I change the order status from on-hold to processing

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author Pepro Dev. Group

    (@peprodev)

    Hi, thank you for using our products.
    You can hook into our plugin using
    peprodev_uploadreceipt_customer_uploaded_receipt
    which receives two argument, $Order_ID, $Attachment_ID.

    Please let me know if there’s anything else you need.

    Have a nice day, Amirhossein, CTO

    Thread Starter creatyfco

    (@creatyfco)

    thankyou for the fast respond

    and thank you for the hook, works like charm right now
    so much grateful for what you do in this plugin

    thankyou and thankyou ????

    Plugin Author Pepro Dev. Group

    (@peprodev)

    Hi, thank you for your warm message, we would appreciate it if you please rate 5-star our plugin and share your experience using it.

    Thank you again. <3

    Sergio

    (@srosales1000)

    Hi, Really nice plugin. Congrats! I have the same request, but I would like to change the status to processing, can you provide a snippet for that?
    Thank you very much in advance

    @creatyfco would you mind posting the code snippet you used with this hook to change the order status to “on hold”?

    I’m trying to do exactly the same thing on my site, but I’m still a beginner when it comes to learning PHP.

    However, if I see a snippet of code using this hook, I think I’ll be able to figure out how to use it within my own website.

    I hope this isn’t too much to ask. Would really be grateful for the help though.

    Plugin Author Pepro Dev. Group

    (@peprodev)

    Hi, hope you are doing well.
    The snippet you wanted:

    add_action( "peprodev_uploadreceipt_customer_uploaded_receipt", "peprodev_change_order_status", 10, 2);
    function peprodev_change_order_status($order_id, $attachment_id){
      $order = wc_get_order($order_id);
      $order->update_status("processing");
    }

    if you enjoyed using our product, please consider giving us a five-star rating.
    Thank you.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘change order status’ is closed to new replies.