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

Jul 31, 2022 | WooCommerce Tips | 0 comments

This function changes the COD default order status to “On Hold” instead of “Processing” in Woocommerce
/* Change COD default order status to "On Hold" instead of "Processing" in Woocommerce BEGIN */
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';
}
/* Change COD default order status to "On Hold" instead of "Processing" in Woocommerce END */

0 Comments

Submit a Comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.