Skip to content

Instantly share code, notes, and snippets.

@actualityextensions
Last active March 19, 2024 17:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save actualityextensions/1d31a36101e634c3193db24ef2fd4634 to your computer and use it in GitHub Desktop.
Save actualityextensions/1d31a36101e634c3193db24ef2fd4634 to your computer and use it in GitHub Desktop.
This snippet is the starting point for extending your plugin's functionality in response to POS order updates.
<?php
// Support to trigger after POS order is updated.
add_action('wc_pos_order_updated', function($order_id) {
$order = wc_get_order($order_id);
if ($order) {
// Implement your custom logic here.
// This can range from sending notification emails,
// updating order metadata, making API calls,
// or any other action required by your plugin or theme.
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment