woocommerce_cod_process_payment_order_status filter-hookWC 1.0

Mark as processing or on-hold (payment won't be taken until delivery).

Usage

add_filter( 'woocommerce_cod_process_payment_order_status', 'wp_kama_woocommerce_cod_process_payment_order_status_filter', 10, 2 );

/**
 * Function for `woocommerce_cod_process_payment_order_status` filter-hook.
 * 
 * @param  $on-hold 
 * @param  $order   
 *
 * @return 
 */
function wp_kama_woocommerce_cod_process_payment_order_status_filter( $on-hold, $order ){

	// filter...
	return $on-hold;
}
$on-hold
-
$order
-

Where the hook is called

WC_Gateway_COD::process_payment()
woocommerce_cod_process_payment_order_status
woocommerce/includes/gateways/cod/class-wc-gateway-cod.php 327
$order->update_status( apply_filters( 'woocommerce_cod_process_payment_order_status', $order->has_downloadable_item() ? 'on-hold' : 'processing', $order ), __( 'Payment to be made upon delivery.', 'woocommerce' ) );

Where the hook is used in WooCommerce

Usage not found.