woocommerce_cod_process_payment_order_status

woocommerce_cod_process_payment_order_status

Appears in: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,
Hook Type: filter

See hook in core

Displaying hooks found in version: woocommerce.9.5.1

apply_filters('woocommerce_cod_process_payment_order_status') is found 1 times:

  • /includes/gateways/cod/class-wc-gateway-cod.php line 349
    		$order = wc_get_order( $order_id );
    
    		if ( $order->get_total() > 0 ) {
    			// Mark as processing or on-hold (payment won't be taken until delivery).
    			$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' ) );
    		} else {
    			$order->payment_complete();
    		}
    
    		// Remove cart.
    		WC()->cart->empty_cart();