Support » Plugin: WooCommerce Upload Receipt » Order status after receipt uploaded

  • Resolved jovern

    (@jovern)


    Hi,

    first of all. thanks for this plugin!
    after the customer has uploaded receipt at BACS page, i notice that the order status skip “on-hold” status and become “processing”. Can i set the order status back to “on-hold” after receipt uploaded?

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Pepro Dev

    (@peprodev)

    Hello, thank you for using our product.

    After successful uploading receipt, order status goes as receipt-approval,
    $order->update_status('receipt-approval')

    and if you want to change order status to something else, there’s a hook for this.

    do_action(“woocommerce_customer_uploaded_receipt”, $postOrder, $attachment_id);

    a sample should be something like:

    add_action("woocommerce_customer_uploaded_receipt", function($postOrder, $attachment_id){
    $order = wc_get_order($postOrder);
    $order->update_status('on-hold');
    }, 10, 2);
    

    Yours sincerely,
    Amirhosein, Lead Developer

    • This reply was modified 2 months ago by Pepro Dev.

    Hi! Im trying to make this hook work…
    in my case, after approving receipt manually the order status remains on “awaiting for approval” status. Shouldn’t it change automatically to “processing”?
    How can i achieve that function?

    Plugin Author Pepro Dev

    (@peprodev)

    You need a different hook, here is it:
    woocommerce_admin_changed_receipt_approval_status
    https://github.com/peprodev/wc-upload-reciept/blob/main/wc-upload-reciept.php#L319

    Awesome! thank you very much!

Viewing 4 replies - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.