By default, the WooCommerce Review and Approve workflow expects the user to upload a file to a product page which then requires the admin to respond.
If you prefer, you can create a workflow which doesn’t expect a file from the user initially and which also bypasses the admin’s initial interaction with the placed order. This means that after checking out, the next stage in the process is for the user to upload a file from their Account page.
To enable this, you’ll need to add this snippet:
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Automatically set order status to waiting for customer review when new order is placed | |
*/ | |
function prefix_after_maybe_prevent_status_transition( $order, $from_status, $to_status, $order_has_workflow, $status_is_workflow, $waiting ) { | |
if( ! $status_is_workflow && $waiting !== "wc-$from_status" && $waiting !== "wc-$to_status" ) { | |
// Not already in a workflow, so a new order | |
$order->set_status( $waiting ); | |
} | |
} | |
add_action( 'rawc_after_maybe_prevent_status_transition', 'prefix_after_maybe_prevent_status_transition', 10, 6 ); | |
add_filter( 'rawc_allow_zero_files', '__return_true' ); |
This will allow a workflow to be initiated even when there are no files uploaded to the order and it will set the status of the order to ‘Waiting’ – meaning the customer is required to then upload their file to the Account page.