Woocommerce plugin on order updates
New here? Learn about Bountify and follow @bountify to get notified of new bounties! x

Hi,

I need a quick plugin for Woocommerce that when the order is updated calls a function.

When the order is updated -> The customer ID is found & get the uuid (below).

uuid = get_user_device_token($user_id);

$message = 'Status updated to: '.$status;

Then trigger sendPushNotifications($retrunedUUID, $message);

Functions to call:
https://pastebin.com/YkE1w8eu

Another example is this plugin that works with BuddyPress.
https://github.com/wordappco/wordapp-bp-push-notifications/blob/master/wordapp-bp-push-notification.php

Thanks

Dave

I'm happy to tip if $25 isn't enough.

awarded to Zhopon

Crowdsource coding tasks.

1 Solution

Winning solution

You can add this codes in functions.php . This should work with your existing code.

https://pastebin.com/323SB4wT

Update :

Added $user_id and made some minor improvements.

https://pastebin.com/mhgMrP20

Let me know it this help you.

Hey, that's great thanks. 2 questions 1. Where does the user_id come from. 2. If I add another gig can you do the same thing for https://wordpress.org/plugins/easy-digital-downloads/
davesargent 1 month ago
Sorry, i had missed the $user_id. I have updated the solution now. For Easy digital Download i will have to give it a try.
Zhopon 1 month ago
Thanks so much
davesargent 1 month ago