The hook needs to be injected in your module, its not recommended to override the ecommerce pages, so in your modules custom provider you can add the hook registration.
the hook name post_product_order_received and you will receieve the $order variable
\Actions::add_action('post_product_order_received', [YourHooksClass::class, 'send_sms'], 12);
so the function will be inside YourHooksClass.php
public function send_sms($order)
\\ Your custom code
Please login or Register to submit your answer