Change COD default order status to “On Hold” instead of “Processing” in Woocommerce

Updated: The code that you found in Github is outdated, clumsy and complicated, since there is a dedicated filter hook now. You should better try this lightweight and effective code, that will set the default order status for “Cash on delivery” payment gateway (COD) to “On Hold”:

add_filter( 'woocommerce_cod_process_payment_order_status', 'change_cod_payment_order_status', 10, 2 );
function change_cod_payment_order_status( $order_status, $order ) {
    return 'on-hold';
}

Code goes in functions.php file of your active child theme (active theme). Tested and works.

enter image description here

So the default order status set by the payment gateway is now “On Hold” instead of “Processing”

Leave a Comment