Skip to content

Instantly share code, notes, and snippets.

@bekarice
Created April 19, 2017 23:56
Show Gist options
  • Save bekarice/2836a0ee221b4e4397c798e4498885ee to your computer and use it in GitHub Desktop.
Save bekarice/2836a0ee221b4e4397c798e4498885ee to your computer and use it in GitHub Desktop.
Force COD orders to 'on hold'
<?php // only copy if needed
/**
* Forces orders be marked as "on hold
*/
function sv_wc_cod_order_status( $status ) {
return 'on-hold';
}
add_filter( 'woocommerce_cod_process_payment_order_status', 'sv_wc_cod_order_status', 15 );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment