4

We have orders that have to be approved by another party after ordering and receiving the payment.

So I want to set it onHold after payment and unHold it via an API call I have to implement as well.

This question is about the first part:

I tried to hook an $order->hold() into the event sales_order_place_after, but the order still switches to PROCESSING.

Also I saw that in the admin interface I cannot set an PROCESSING order to hold is not working:

I am getting

No order(s) were put on hold.

EDIT1

Debugging: Setting to Processing is happening here:

\Magento\Sales\Model\Order\Payment\State\RegisterCaptureNotificationCommand::execute

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.