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
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;
}
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