Skip to content

Instantly share code, notes, and snippets.

@markduwe
Last active November 5, 2017 11:19
Show Gist options
  • Select an option

  • Save markduwe/bbab89395bddc3b547f3ebca2f77c5e6 to your computer and use it in GitHub Desktop.

Select an option

Save markduwe/bbab89395bddc3b547f3ebca2f77c5e6 to your computer and use it in GitHub Desktop.
Woocommerce SMS notification

Find out your carrier and if they have an email to SMS service. It'll be something like 1234567890@carrier.email.com.

Replace "your_sms_email" with that email address and insert the code block into your theme functions file.

It hooks into the new order function, so sends an SMS when a new order is created.

Useful as the WooComm app doesn't yet have push notifications and emails can sometimes take a while to come through.

add_action( 'woocommerce_new_order', 'send_text', 1, 1 );
function send_text() {
$msg = "You have a new order";
mail("your_sms_email","",$msg);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment