woocommerce_cod_process_payment_order_status
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
woocommerce_cod_process_payment_order_status
woocommerce/includes/gateways/cod/class-wc-gateway-cod.php 349
$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' ) );