Created
March 28, 2023 17:24
-
-
Save PechenkiUA/fde0fa27a4798d3fa8772df6e2b75eb8 to your computer and use it in GitHub Desktop.
Send message from change status
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Send message from change status | |
*/ | |
add_action('woocommerce_order_status_changed',function ( $order_id, $old_status, $new_status, $order){ | |
global $Telsender; | |
if ($new_status == 'processing'){ | |
$text = sprintf('%s - order_status_changed',$new_status); | |
$Telsender->telegram->SendMesage($text); | |
} | |
}, 10, 4); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment