• When someone paid on svea via card, invoice, pay later i want to set on-hold status not processing. because then we manually edit orders. how to change it?

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Support janettheg

    (@janettheg)

    Hi,

    It’s possible to do, but it’s not something specific to Svea – you would need to use a hook like ‘woocommerce_payment_complete_order_status’ to change the status that is set when an order is marked as paid.

    Best regards

    Thread Starter Rokeybur Rahman

    (@rokeyfx)

    does it work with svea? we have HPOS enable also.

    // change payment processing to on hold
    add_filter( ‘woocommerce_payment_complete_order_status’, ‘rfvc_update_order_status’, 999, 2 );

    function rfvc_update_order_status( $order_status, $order_id ) {

    $order = new WC_Order( $order_id );

    //$paymethod = $order->payment_method_title;

    if ( ‘processing’ == $order_status ) {

    return ‘on-hold’;

    }

    return $order_status;
    }

    Plugin Support janettheg

    (@janettheg)

    Hi,

    Yes, Svea Checkout for WooCommerce is compatible with HPOS and regarding your code snippet it should work with Svea Checkout as it’s a standard WooCommerce filter.

    Best regards

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘how to set on-hold’ is closed to new replies.