Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Execute the 'order.updated' webhook when bulk editing and using the status action buttons (fixes #8116) #8303

Merged

Conversation

justinshreve
Copy link
Contributor

Fixes #8116.

The order.updated webhook is not executed when changing the order status via the bulk edit tools or the action buttons.

This PR adds a new hook when the status gets updated, and adds that hook to the list of topics for order.updated. Since the list of topic hooks is only flushed when editing or creating a webhook, an upgrade routine is also added so that users upgrading to 2.4 will have the hook execute without having to go manually refresh all of their hooks.

Testing Steps:

  • Create a webhook using the "Order Updated" topic (you can also existing webhook after running the upgrade routine)
  • Go to /wp-admin/ > WooCommerce > Orders
  • Bulk select some orders and change their status
  • See that webhooks are fired by looking at the webhook logs
  • Go to wp-admin > WooCommerce > Orders
  • Mark an order as complete using the action button
  • Note that a webhook is fired by looking at the webhook logs

@justinshreve justinshreve self-assigned this Jun 5, 2015
@justinshreve justinshreve changed the title Execute the 'order.updated' webhook when bulk editing and using the status action buttons Execute the 'order.updated' webhook when bulk editing and using the status action buttons (fixes #8116) Jun 5, 2015
@claudiosanches
Copy link
Contributor

Great work!

claudiosanches added a commit that referenced this pull request Jun 5, 2015
Execute the 'order.updated' webhook when bulk editing and using the status action buttons (fixes #8116)
@claudiosanches claudiosanches merged commit ecac3fb into woocommerce:master Jun 5, 2015
@justinshreve justinshreve deleted the bulk-edit-webhook-8116 branch June 9, 2015 13:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants