How to observe invoice creation / custom sales order status?

observer
invoice

(Raul Sanchez) #1

We have some custom code executed in sales_order_save_before event. The purpose of that code is to check some order parameters (orig state, current state, etc…) & set a custom status to order after the invoice is created. This code is working fine for manually created invoices, in backoffice

However, that code is not working for Stripe created orders, so I assume your module is creating the invoices in a different way as the adminhtml request does

Can you please provide where in your code are invoices being created? Or maybe provide some list of fired events, or any tip to replicate our custom code for Stripe payment method?

As I think this is a common request (most of our customers like to have different status for different payment methods), one great feature for this module could be adding a new backoffice parameter, so users can set a custom status for orders processed via Stripe


(Dmitry Fedyuk) #2

To answer such questions, it is enough to have generic Magento 2 knowlegde ans skills, and is not needed to change anything in the Stripe extension, and even is not needed to read its source code.
So the question in not related ti the Stripe extension, and, as I said before, I can answer such questions only on the terms of my generic Magento 2 support service.