I have implemented custom order status on-review
and now I need to send WooCommerce default on-hold email when switching order statuses from on-review
to on-hold
.
In order to do this, I have to add new woocommerce_order_status_on-review_to_on-hold_notification
action that will run trigger
method of WC_Email_Customer_On_Hold_Order
class.
It looks like there are no hooks nor filters to add this action to default WC_Email_Customer_On_Hold_Order
constructor and I have to override this class with custom one. To do so, I need to define my custom WC_Email_Customer_On_Hold_Order
class after WC_Email
class is defined, and before WC_Email_Customer_On_Hold_Order
class is defined.
The problem is that both these classes are included during init
method execution of WC_Emails
and there are no hooks between file inclusions.
Is there any other way to solve my problem?